|
| 1 | +# Express API Starter with Typescript |
| 2 | + |
| 3 | +How to use this template: |
| 4 | + |
| 5 | +```sh |
| 6 | +npx create-express-api --typescript --directory my-api-name |
| 7 | +``` |
| 8 | + |
| 9 | +Includes API Server utilities: |
| 10 | + |
| 11 | +* [morgan](https://www.npmjs.com/package/morgan) |
| 12 | + * HTTP request logger middleware for node.js |
| 13 | +* [helmet](https://www.npmjs.com/package/helmet) |
| 14 | + * Helmet helps you secure your Express apps by setting various HTTP headers. It's not a silver bullet, but it can help! |
| 15 | +* [dotenv](https://www.npmjs.com/package/dotenv) |
| 16 | + * Dotenv is a zero-dependency module that loads environment variables from a `.env` file into `process.env` |
| 17 | +* [cors](https://www.npmjs.com/package/cors) |
| 18 | + * CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options. |
| 19 | + |
| 20 | +Development utilities: |
| 21 | + |
| 22 | +* [typescript](https://www.npmjs.com/package/typescript) |
| 23 | + * TypeScript is a language for application-scale JavaScript. |
| 24 | +* [ts-node](https://www.npmjs.com/package/ts-node) |
| 25 | + * TypeScript execution and REPL for node.js, with source map and native ESM support. |
| 26 | +* [nodemon](https://www.npmjs.com/package/nodemon) |
| 27 | + * nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected. |
| 28 | +* [eslint](https://www.npmjs.com/package/eslint) |
| 29 | + * ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. |
| 30 | +* [typescript-eslint](https://typescript-eslint.io/) |
| 31 | + * Tooling which enables ESLint to support TypeScript. |
| 32 | +* [jest](https://www.npmjs.com/package/jest) |
| 33 | + * Jest is a delightful JavaScript Testing Framework with a focus on simplicity. |
| 34 | +* [supertest](https://www.npmjs.com/package/supertest) |
| 35 | + * HTTP assertions made easy via superagent. |
| 36 | + |
| 37 | +## Setup |
| 38 | + |
| 39 | +``` |
| 40 | +npm install |
| 41 | +``` |
| 42 | + |
| 43 | +## Lint |
| 44 | + |
| 45 | +``` |
| 46 | +npm run lint |
| 47 | +``` |
| 48 | + |
| 49 | +## Test |
| 50 | + |
| 51 | +``` |
| 52 | +npm run test |
| 53 | +``` |
| 54 | + |
| 55 | +## Development |
| 56 | + |
| 57 | +``` |
| 58 | +npm run dev |
| 59 | +``` |
0 commit comments