Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }
npx create-api-starter@latest
| Features | JS | TS |
|---|---|---|
| Language Support | βοΈ | βοΈ |
| Scaffold Anywhere | βοΈ | βοΈ |
| Initialize Git | βοΈ | βοΈ |
| Import Statement | βοΈ | βοΈ |
| Custom Favicon | βοΈ | βοΈ |
| Logging | βοΈ | βοΈ |
| Rate Limiting | βοΈ | βοΈ |
| Custom Error Handling | βοΈ | βοΈ |
| Nodemon Support | βοΈ | βοΈ |
Serve public files |
βοΈ | βοΈ |
| Barrel Export | βοΈ | βοΈ |
| Linting Support | βοΈ | βοΈ |
| API Versioning | βοΈ | βοΈ |
| Simple Folder Structure | βοΈ | βοΈ |
| Highly Customizable | βοΈ | βοΈ |
Inside of your create-api-starter project, you'll see the following folders and files:
.
βββ .babelrc
βββ .env
βββ .eslintrc.json
βββ .gitignore
βββ README.md
βββ package-lock.json
βββ package.json
βββ src
βββ app.js
βββ public
β βββ favicon.ico
βββ v1
βββ config
β βββ env.config.js
βββ controllers
β βββ Default.controller.js
β βββ index.js
βββ middlewares
β βββ Default.middleware.js
β βββ index.js
βββ routes
βββ Default.route.js
βββ index.js
.
βββ .env
βββ .eslintrc.json
βββ .gitignore
βββ README.md
βββ package-lock.json
βββ package.json
βββ src
β βββ app.ts
β βββ public
β β βββ favicon.ico
β βββ types
β β βββ index.d.ts
β βββ v1
β βββ config
β β βββ env.config.ts
β βββ controllers
β β βββ Default.controller.ts
β β βββ index.ts
β βββ middlewares
β β βββ Default.middleware.ts
β β βββ index.ts
β βββ routes
β βββ Default.route.ts
β βββ index.ts
βββ tsconfig.json
Any static assets, like images, can be placed in the src/public/ directory.
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at http://localhost:5000 |
npm run build |
Build your production site to ./build/ |
npm run start |
Preview your build locally, before deploying |
npm run lint |
Shows linting errors |
npm run lint-fix |
Fixes linting errors |
