/* eslint-disable no-undef */
// 这里是生产环境的反向代理逻辑
const initService = () => {
  const express = require("express");
  const router = require("./core/router/index.cjs");
  // const logger = console
  const config = require("./core/utils/config.cjs");
  const logger = require("./core/utils/log.cjs");
  const server = express();
  const PORT = config.port;
  server.use(router.httpService);
  server.listen(PORT, function () {
    logger.info(`server start at http://127.0.0.1:${PORT}`);
  });
};
try {
  initService();
} catch (e) {
  console.error(e);
}
