Initial server code. Building scripts

This commit is contained in:
unknown
2021-09-18 15:01:20 +02:00
parent 77adabc2af
commit fa6333a8fa
12 changed files with 2682 additions and 15 deletions

16
src/server.ts Normal file
View File

@@ -0,0 +1,16 @@
import dotenv from 'dotenv';
import express from 'express';
import { Logger } from './utils';
// Env config
dotenv.config({ path: './src/config/.env' });
const app = express();
const logger = new Logger();
const PORT = process.env.PORT;
app.listen(PORT, () => {
logger.log(
`Server is working on port ${PORT} in ${process.env.NODE_ENV} mode`
);
});