feat: 🎉 App endpoint
This commit is contained in:
parent
ad0f30876e
commit
9f8582c412
27
src/app.ts
Normal file
27
src/app.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import express, { type Express } from 'express';
|
||||
import cors from 'cors';
|
||||
import compression from 'compression';
|
||||
import {Logger} from "tslog";
|
||||
|
||||
|
||||
const logger = new Logger({ name: "App" });
|
||||
|
||||
const app: Express = express();
|
||||
|
||||
// enable cors
|
||||
app.use(cors());
|
||||
app.options('*', cors());
|
||||
|
||||
// parse json request body
|
||||
app.use(express.json());
|
||||
|
||||
// parse urlencoded request body
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
|
||||
// gzip compression
|
||||
app.use(compression())
|
||||
|
||||
//app.use('/auth', AuthRoutes)
|
||||
|
||||
//app.listen(3333)
|
||||
logger.info('Server is running !')
|
Loading…
x
Reference in New Issue
Block a user