Skip to content

Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }

License

Notifications You must be signed in to change notification settings

pinakipb2/create-api-starter

Repository files navigation

create-api-starter

Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }

👨‍💻 Getting Started 👩‍💻

npx create-api-starter@latest

create-api-starter

✨ Features

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 ✔️ ✔️

🚀 Project Structure

Inside of your create-api-starter project, you'll see the following folders and files:

JS

.
├── .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

TS

.
├── .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.

🧞 Commands

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

About

Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }

Topics

Resources

License

Stars

Watchers

Forks