Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import "../../configEnv"; import { VersedKoaServer } from "@versed/core"; let services = (process.env.SERVICES || "").split(",").map(s => s.trim()); if (services.length === 1 && services[0] === "") { services = ["api", "auth", "resume", "token", "user", "blog"]; } const main = async () => { const server = new VersedKoaServer(); try { for (const serviceName of services) { const launcher = require(`./${serviceName}.service`).default; await launcher(server); server.rootCtx.logger.info(`loaded service: ${serviceName}`); } await server.start(); } catch (e) { server.rootCtx.logger.error("FATAL: ", e); } }; main(); |