Set port
This commit is contained in:
parent
5672fbf300
commit
658f5b186d
@ -17,9 +17,13 @@ enum CapError: Error {
|
|||||||
|
|
||||||
var response: HTTPResponseStatus {
|
var response: HTTPResponseStatus {
|
||||||
switch self {
|
switch self {
|
||||||
|
/// 404
|
||||||
case .unknownId: return .notFound
|
case .unknownId: return .notFound
|
||||||
|
/// 400
|
||||||
case .invalidBody: return .badRequest
|
case .invalidBody: return .badRequest
|
||||||
|
/// 409
|
||||||
case .dataInconsistency: return .conflict
|
case .dataInconsistency: return .conflict
|
||||||
|
/// 412
|
||||||
case .invalidFile: return .preconditionFailed
|
case .invalidFile: return .preconditionFailed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@ import Vapor
|
|||||||
public func configure(_ app: Application) throws {
|
public func configure(_ app: Application) throws {
|
||||||
// uncomment to serve files from /Public folder
|
// uncomment to serve files from /Public folder
|
||||||
// app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory))
|
// app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory))
|
||||||
|
|
||||||
|
app.http.server.configuration.port = 6001
|
||||||
|
|
||||||
// Register routes to the router
|
// Register routes to the router
|
||||||
try routes(app)
|
try routes(app)
|
||||||
// Configure the rest of your application here
|
// Configure the rest of your application here
|
||||||
|
Loading…
Reference in New Issue
Block a user