some
This commit is contained in:
1 parent
600dbf172d
commit
6357258f45
3 files changed
+315
-2
No files matched your search
@@ -11,6 +11,7 @@ public func configure(_ app: Application) async throws {
|
||||
app.databases.use(DatabaseConfigurationFactory.sqlite(.file("db.sqlite")), as: .sqlite)
|
||||
|
||||
app.migrations.add(CreateTodo())
|
||||
app.http.server.configuration.address = .hostname("localhost", port: 9090)
|
||||
|
||||
// register routes
|
||||
try routes(app)
|
||||
|
||||
@@ -8,7 +8,7 @@ enum Entrypoint {
|
||||
static func main() async throws {
|
||||
var env = try Environment.detect()
|
||||
try LoggingSystem.bootstrap(from: &env)
|
||||
|
||||
|
||||
let app = try await Application.make(env)
|
||||
|
||||
// This attempts to install NIO as the Swift Concurrency global executor.
|
||||
@@ -17,7 +17,7 @@ enum Entrypoint {
|
||||
// If enabled, you should be careful about calling async functions before this point as it can cause assertion failures.
|
||||
// let executorTakeoverSuccess = NIOSingletons.unsafeTryInstallSingletonPosixEventLoopGroupAsConcurrencyGlobalExecutor()
|
||||
// app.logger.debug("Tried to install SwiftNIO's EventLoopGroup as Swift's global concurrency executor", metadata: ["success": .stringConvertible(executorTakeoverSuccess)])
|
||||
|
||||
|
||||
do {
|
||||
try await configure(app)
|
||||
try await app.execute()
|
||||
|
||||
Reference in new issue
Block a user