Created
June 29, 2020 16:36
-
-
Save birendra-b/83569f5c55013edc9f471ac8be1b1d1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cookieParser from 'cookie-parser'; | |
import express, { Request, Response, NextFunction } from 'express'; | |
import { BAD_REQUEST } from 'http-status-codes'; | |
import BaseRouter from './routes'; | |
// Init express | |
const app = express(); | |
/************************************************************************************ | |
* Set basic express settings | |
***********************************************************************************/ | |
app.use(express.json()); | |
app.use(express.urlencoded({extended: true})); | |
app.use(cookieParser()); | |
// Add APIs | |
app.use('/api', BaseRouter); | |
// Export express instance | |
export default app; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment