A skeleton project for a RESTful web service with Express.js, TypeScript, Mocha, and Chai.
src/index.ts
: entry file for the app that starts of express serversrc/App.ts
: express app class where middleware is configuredsrc/routes/
: directory for all routes; all*.routes.ts
files in here are automatically included byindex.ts
and injected intoApp.ts
.src/config/config.ts
: configuration file with app or environment specific propertiestest/
: directory for all tests
# install dependencies
npm install
# serve locally with hot reload on localhost:3000 (adjustable in `src/config/config.ts` or with ENV variable `PORT`)
npm start
# build node.js version for production
npm run build
# start created production build
npm run prod
# run TypeScript linter
npm run lint
# run tests
npm test
- TSLint (enforces coding rules in
tslint.json
) - EditorConfig (enforces code formatting in
.editorconfig
)