'created CapCollectorServer from template https://github.com/twostraws/vapor-clean'

This commit is contained in:
christophhagen
2020-05-17 20:01:30 +02:00
commit bdbdcf2081
15 changed files with 224 additions and 0 deletions

26
Sources/Run/main.swift Executable file
View File

@ -0,0 +1,26 @@
import App
import Service
import Vapor
import Foundation
// The contents of main are wrapped in a do/catch block because any errors that get raised to the top level will crash Xcode
do {
var config = Config.default()
var env = try Environment.detect()
var services = Services.default()
try App.configure(&config, &env, &services)
let app = try Application(
config: config,
environment: env,
services: services
)
try App.boot(app)
try app.run()
} catch {
print(error)
exit(1)
}