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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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