1.0.1 • Published 7 years ago
@nahidrezvee/express-cli v1.0.1
nahidx - Express-Cli
nahidx is a cli tool that helps develop rest api based express.js applications by creating new project by following standard express.js project architecture and helps generate different modules (Ex: Routes, Models, Middlewares).
Installation
Either through cloning with git or by using npm (the recommended way):
npm install -g @nahidrezvee/express-cliAnd nahidx will be installed globally to your system path.
Usage
nahidxJust one command, then you will be asked to choose what you want to create.
? What do you want to create? (Use arrow keys)
> Model
Middleware
Route
New ProjectNew Project
- Creates a new Project
- Installs the dependencies (Ex: Express.js, Mongoose, Joi)
Model
- Creates a new Model
- Created Model File will be found on the
<project-root>/modelsdirectory.
Middleware
- Creates a new Middleware
- Created Middleware File will be found on the
<project-root>/middlewaresdirectory.
Route
- Creates new Route
- Created Route File will be found on the
<project-root>/routesdirectory. - Import the new route to
index.jsand uses the route as http end-point
Note
$ Please run
nahidxon<project-root>, otherwise it won't work properly. $nahidxuses// commentsto identify file structure. Please don't remove the// comments
Ask ME
Thank you to all. Ask me linkedin! 🙏
