Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

19 wiersze
717 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 = "1mb"
  9. app.databases.use(.postgres(hostname: "localhost", username: "mcarman", password: "@ng31F@rm0823262", database: "fueling"), as: .psql)
  10. app.http.server.configuration.port = 3001
  11. app.migrations.add(CreateFuelEntry())
  12. app.migrations.add(AddLatitudeAndLongitudeAndRemoveGpsLocationAndImage())
  13. try await app.autoMigrate().get()
  14. // register routes
  15. try routes(app)
  16. }