Original template found here: https://github.com/w3cj/express-api-starter.git. I've heavily modified it so that you can have an excellent development experience.
- You need
bun
package manager installed on your system https://bun.sh/. - Some of the scripts make use of Node Version Manager (
nvm
) https://github.com/nvm-sh/nvm. If you don't want to install it, just search fornvm
in this repo and adjust.
- morgan
- HTTP request logger middleware for node.js
- helmet
- Helmet helps you secure your Express apps by setting various HTTP headers. It's not a silver bullet, but it can help!
- dotenv
- Dotenv is a zero-dependency module that loads environment variables from a
.env
file intoprocess.env
- Dotenv is a zero-dependency module that loads environment variables from a
- cors
- CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
- typescript
- TypeScript is a language for application-scale JavaScript.
- ts-node
- TypeScript execution and REPL for node.js, with source map and native ESM support.
- eslint
- ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
- typescript-eslint
- Tooling which enables ESLint to support TypeScript.
- eslint-plugin-typescript-sort-keys
- jest
- Jest is a delightful JavaScript Testing Framework with a focus on simplicity.
- supertest
- HTTP assertions made easy via superagent.
- prettier
- An opinionated code formatter
- @trivago/prettier-plugin-sort-imports
- husky
- Husky improves your commits and more 🐶 woof!
- You can use it to lint your commit messages, run tests, lint code, etc... when you commit or push.
- lint-staged
- Run linters against staged git files and don't let 💩 slip into your code base!
- You can use this script after you first clone this repo to get things up and running.
- You can use this script to get a
production
server up and running.
bun run full-start
This script will do the following for you:
bun run clean # delete node_modules/
bun install
bun run build
bun run start
bun run start
bun run dev
bun run lint
bun run test