Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johurul-haque/write-module
CLI tool for quickly generating necessary files for an Express application following the modular pattern
https://github.com/johurul-haque/write-module
express typescript
Last synced: 5 days ago
JSON representation
CLI tool for quickly generating necessary files for an Express application following the modular pattern
- Host: GitHub
- URL: https://github.com/johurul-haque/write-module
- Owner: johurul-haque
- Created: 2023-12-24T15:50:06.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-21T17:07:14.000Z (6 months ago)
- Last Synced: 2024-09-22T10:45:10.895Z (about 2 months ago)
- Topics: express, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/write-module
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# write-module
If you use the modular pattern for an express application, each module in the modules directory needs to have at least **five** files (controller, route, service, interface, model). This package is a CLI tool to create those files easily.
## Install globally
```bash
$ npm install -g write-module
```## Usage
```bash
$ write-module hello-world
```
This command will create a `hello-world` directory with the following files in the `src/modules` directory.```bash
├── user.interface.ts
├── user.route.ts
├── user.controller.ts
├── user.model.ts
└── user.service.ts
```You can change the output directory path by using the following command
```bash
$ write-module hello-world src/app/modules
```Now the directory with the file will be created in `src/app/modules`