This is a simple Typescript Skeleton/Boilerplate project to help you get started with Express in a few minutes.
Simply clone this repository and running npm i
to get all dependencies installed. After completed run command below to run the development server.
npm run dev
Get ready for production? run command below to transpile targeting commonjs script.
npm run build
Start the transpiled script
npm start
npm run lint
This project was setup using OvernightJS typescript decorator to help you managing the controllers & the express behaviors. Take a look into src/controllers/UserController.ts
to get you inspired!.
As mentioned before, you can see the example of controller on src/controllers/UserController.ts
. It has several api endpoint examples also with error exception.
Middlewares are placed into src/middlewares
directory, everything about middleware should be dropped here.
This project already supplied with some basic Exception class, see src/exceptions
for the details. Also take a look into implementation on controllers/UserController.ts
and middlewares/error*.ts
for more detail usage.
Middlewares are placed into src/interfaces
directory, everything about interface should be dropped here.
This project is licensed under the MIT License