npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

express-cli-tool

v1.4.0

Published

Express CLI Tool for creating express application, automatic DB intializing and module creating

Downloads

386

Readme

Express CLI Tool (express-cli-tool)

Kickstart your ExpressJS projects with ease using express-cli-tool, a powerful boilerplate generator designed to streamline the setup process and accelerate your development workflow. This npm package provides a robust foundation for Express applications, complete with pre-configured database settings and an automated component creation system.

Express CLI Tool supports on MacOS, windows and Linux.

Installation

You should install it globally.

With NPM

npm install -g express-cli-tool

With Yarn

yarn global add express-cli-tool

Create an Express Applciation

Your system will need to have Node 16.16.0 or later version.

To create an express app, you can choose one of the following method.

Through Prompt

express create-app

This command will prompt to multiple options for configuring express app and database.

Through Command

express create-app -t <templateName> -p <port> -d <database-type> -dn <database-name> <app name>

The command options are:

| Options | Description | |----------------------|--------------------------------------------| | -t, --template | Specify the template [expressjs, expressts]| | -p, --port | Specify the port, default 8081 | | -d, --database | Specify the database [mongo, dynamo, none] | | -dn, --databaseName | Assign a name for database |

you can use --help command for knows this options and commands:

express --help

Example

express create-app -t expressjs -p 3040 -d mongo -dn testdb app

After running the above commad it will create a project directory 'app' inside current folder. Inside the directory You can see the Express Application.

app
├── node_modules
├── src
|    ├── config
|    ├── controller
|    ├── helper
|    ├── model
|    ├── router
|    ├── utils
|    └── app.js
├── .env
├── .gitignore
├── package-lock.json
└── package.json

Once the installation is done, open your project folder:

cd app

Applciation created.

Run Application

For running application

Using nodemon

npm run dev

or

yarn run dev

Using node

npm start

or

yarn start

Create Module

You can automatically create modules. Which means you can create Controller, router, model and helper templates using command.

command for creating module

express create-module <module-name>

For example;

express create-module user

It will create user.controller, user.router, user.model and user.helper files with basic crud api.

Change Port

You can change the port of the application.

express change-port < port >

For Example

express change-port 3040

About Express CLI Tool

| Features | Description | |-------------------------|---------------------------------| | Boiler Plate Templates | We supports Express-JS and Express-TS tempaltes | | Database | MongoDB | | Module Creation | controller, router, model and helper| | Change Port | Can change the PORT of the application |

DB Configuration

Express automaticaly configure db.

MongoDB

For mongo as the database your system must contains mongod or If you want to run Mongodb Atlas just change the Uri in db.shared.js file as the mongodb atlas connection string

License

Express CLI Tool (express-cli-tool) is open source software licenced as MIT.