25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

21 satır
868 B

  1. import Fluent
  2. import FluentPostgresDriver
  3. import Vapor
  4. // configures your application
  5. public func configure(_ app: Application) async throws {
  6. // uncomment to serve files from /Public folder
  7. // app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory))
  8. app.routes.defaultMaxBodySize = "1000kb"
  9. let timeout = HTTPClient.Configuration.Timeout(connect: .seconds(300), read: .seconds(300))
  10. app.http.client.configuration.timeout = timeout
  11. app.databases.use(.postgres(hostname: "localhost", username: "mcarman", password: "@ng31F@rm0823262", database: "fueling"), as: .psql)
  12. app.http.server.configuration.port = 3001
  13. app.migrations.add(CreateFuelEntry())
  14. app.migrations.add(AddLatitudeAndLongitudeAndRemoveGpsLocationAndImage())
  15. try await app.autoMigrate().get()
  16. // register routes
  17. try routes(app)
  18. }