mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
28 lines
625 B
JavaScript
Executable File
28 lines
625 B
JavaScript
Executable File
import { Server } from "linebridge"
|
|
|
|
import DbManager from "@shared-classes/DbManager"
|
|
|
|
import SharedMiddlewares from "@shared-middlewares"
|
|
|
|
class API extends Server {
|
|
static refName = "marketplace"
|
|
static wsRoutesPath = `${__dirname}/ws_routes`
|
|
static routesPath = `${__dirname}/routes`
|
|
static listen_port = process.env.HTTP_LISTEN_PORT ?? 3005
|
|
|
|
middlewares = {
|
|
...SharedMiddlewares
|
|
}
|
|
|
|
contexts = {
|
|
db: new DbManager(),
|
|
}
|
|
|
|
async onInitialize() {
|
|
await this.contexts.db.initialize()
|
|
}
|
|
|
|
handleWsAuth = require("@shared-lib/handleWsAuth").default
|
|
}
|
|
|
|
Boot(API) |