Skip to content

Instantly share code, notes, and snippets.

@birendra-b
Created June 29, 2020 16:36
Show Gist options
  • Save birendra-b/83569f5c55013edc9f471ac8be1b1d1d to your computer and use it in GitHub Desktop.
Save birendra-b/83569f5c55013edc9f471ac8be1b1d1d to your computer and use it in GitHub Desktop.
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