Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdrahmanes1/express-api-initializer
express-api-inializer used for generate Express js app
https://github.com/abdrahmanes1/express-api-initializer
cli cli-app express express-cli express-crud expressjs npm npm-package npmjs typescript
Last synced: about 1 month ago
JSON representation
express-api-inializer used for generate Express js app
- Host: GitHub
- URL: https://github.com/abdrahmanes1/express-api-initializer
- Owner: abdrahmanES1
- Created: 2023-11-11T12:17:45.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-16T14:07:03.000Z (4 months ago)
- Last Synced: 2024-10-12T08:03:27.350Z (about 1 month ago)
- Topics: cli, cli-app, express, express-cli, express-crud, expressjs, npm, npm-package, npmjs, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/express-api-initializer
- Size: 230 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express API Initializer
Express API Initializer is a tool designed to streamline the process of generating Express.js applications.
## Installation
Ensure you have [node.js](https://nodejs.org/)) installed, then install express-api-initializer globally using [npm](https://www.npmjs.com/):
```bash
npm install -g express-api-initializer
```To create a new project, run:
```bash
express-initializer new
```
Your app structure will be initialized as follows:
📦 app
┣ 📂 config
┃ ┗ 📜 database.config.js
┣ 📂 src
┃ ┣ 📂 controllers
┃ ┃ ┗ 📜 users.controller.js
┃ ┣ 📂 middlewares
┃ ┃ ┣ 📜 error.middleware.js
┃ ┃ ┣ 📜 users.middleware.js
┃ ┃ ┗ 📜 validationMiddleware.middleware.js
┃ ┣ 📂 models
┃ ┃ ┗ 📜 users.model.js
┃ ┣ 📂 schemas
┃ ┃ ┗ 📜 users.schema.js
┃ ┣ 📂 routes
┃ ┃ ┗ 📜 users.route.js
┃ ┣ 📂 utils
┃ ┃ ┗ 📜 errorResponse.js
┃ ┗ 📜 app.js
┣ .env.example
┣ .env
┣ 📜 index.js
┗ 📜 package.jsonTo start the app, navigate to the project directory and run:
```bash
node index.js## Resource Generation
Generate resources using plural nouns:
```bash
express-initializer g resource
```## Controller Generation
Generate controllers using:
```bash
express-initializer g controller
```## Model Generation
Generate models using:
```bash
express-initializer g model
```## Validation Schema Generation
Generate schema using:
```bash
express-initializer g schema
```## Route Generation
Generate routes using:
```bash
express-initializer g route
```
## Middleware GenerationGenerate middleware using:
```bash
express-initializer g middleware
```## Configuration Generation
Generate configs using:
```bash
express-initializer g config
```Feel free to use these commands to efficiently scaffold and organize your Express.js applications.