mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-09 05:25:15 -05:00
19 lines
387 B
TypeScript
19 lines
387 B
TypeScript
import bodyParser from 'body-parser';
|
|
import express from 'express';
|
|
|
|
import { CONFIG } from './config';
|
|
import { router } from './handlers/routes';
|
|
import { errorMiddleware } from './lib/apiHelpers';
|
|
|
|
const app = express();
|
|
|
|
app.use(bodyParser.json());
|
|
|
|
app.use(router);
|
|
|
|
app.use(errorMiddleware);
|
|
|
|
app.listen(CONFIG.port, () => {
|
|
console.log(`Listening on port ${CONFIG.port}`);
|
|
});
|