create-api-starter
v2.2.0
Published
API Starter Created by @pinakipb2
Downloads
1
Maintainers
Readme
:man_technologist: Getting Started :woman_technologist:
npx create-api-starter@latest
:sparkles: Features
| Features | JS | TS |
| :---------------------- | :----------------: | :----------------: |
| Language Support | :heavy_check_mark: | :heavy_check_mark: |
| Scaffold Anywhere | :heavy_check_mark: | :heavy_check_mark: |
| Initialize Git | :heavy_check_mark: | :heavy_check_mark: |
| Import Statement | :heavy_check_mark: | :heavy_check_mark: |
| Custom Favicon | :heavy_check_mark: | :heavy_check_mark: |
| Logging | :heavy_check_mark: | :heavy_check_mark: |
| Rate Limiting | :heavy_check_mark: | :heavy_check_mark: |
| Custom Error Handling | :heavy_check_mark: | :heavy_check_mark: |
| Nodemon Support | :heavy_check_mark: | :heavy_check_mark: |
| Serve public
files | :heavy_check_mark: | :heavy_check_mark: |
| Barrel Export | :heavy_check_mark: | :heavy_check_mark: |
| Linting Support | :heavy_check_mark: | :heavy_check_mark: |
| API Versioning | :heavy_check_mark: | :heavy_check_mark: |
| Simple Folder Structure | :heavy_check_mark: | :heavy_check_mark: |
| Highly Customizable | :heavy_check_mark: | :heavy_check_mark: |
:rocket: 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.
:genie: 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 |