Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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