Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinakipb2/create-api-starter
Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }
https://github.com/pinakipb2/create-api-starter
api expressjs javascript npm-package starter-kit typescipt
Last synced: 17 days ago
JSON representation
Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }
- Host: GitHub
- URL: https://github.com/pinakipb2/create-api-starter
- Owner: pinakipb2
- License: mit
- Created: 2022-12-13T13:31:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-06T11:12:59.000Z (over 1 year ago)
- Last Synced: 2024-12-26T06:03:48.343Z (29 days ago)
- Topics: api, expressjs, javascript, npm-package, starter-kit, typescipt
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/create-api-starter
- Size: 201 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
Express REST API Starter Package: Essential NPM Package for Kickstarting REST API Development { JS / TS }## :man_technologist: Getting Started :woman_technologist:
```
npx create-api-starter@latest
```![create-api-starter](https://user-images.githubusercontent.com/48859773/207340943-3cbe28f0-4d91-4fa9-9b69-3a87f7f88970.png)
## :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 |