You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
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. }