RustyHearts-API/src/servers/jpnApp.js
Junior c3d9e7afb5 Version 1.3.0
- Implemented authentication and billing routes for Jpn region.
- Refactored and changed the project structure from CommonJS to ES Modules
2025-04-29 16:20:09 -03:00

18 lines
No EOL
600 B
JavaScript

import express, { urlencoded } from 'express';
import config from '../config.js';
const { ports, ips, logger } = config;
import authJpnRouter from '../routes/authJpn.js';
import billingJpnRouter from '../routes/billingJpn.js';
const app = express();
app.use(urlencoded({ extended: false, type: 'application/x-www-form-urlencoded' }));
app.use('/Auth', authJpnRouter);
app.use('/Billing', billingJpnRouter);
const startServer = () => {
return app.listen(ports.jpnApp, ips.local, () => {
logger.info(`API (JPN) listening on ${ips.local}:${ports.jpnApp}`);
});
};
export { app, startServer };