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-manager

v1.0.2

Published

An CLI based tool to generate express controller, model and router for you.

Downloads

6

Readme

Express Manager

Express Manager is a CLI-based tool to generate Express controller, model, and router files for your project. This tool helps streamline the setup process for Express applications, ensuring consistency and saving time.

Features

  • Generate model, controller, and router files
  • Supports both JavaScript and TypeScript
  • Easy to use interactive CLI

Installation

To install Express Manager, use npm:

npm install -g express-manager

Usage

Basic Command

To use Express Manager, run the following command:

express-manager generate <type> <name>
  • type: The type of file to generate. This can be model, controller, router, or module.
  • name: The name of the file to generate.

Examples

Generate a Model

express-manager generate model user

This command will generate a model file named user.model.js or user.model.ts based on your selected language.

Generate a Controller

express-manager generate controller user

This command will generate a controller file named user.controller.js or user.controller.ts.

Generate a Router

express-manager generate router user

This command will generate a router file named user.router.js or user.router.ts.

Generate a Full Module

express-manager generate module user

This command will generate all three files: user.model.js (or .ts), user.controller.js (or .ts), and user.router.js (or .ts).

Language Selection

When you run the tool for the first time, you will be prompted to select a language (JavaScript or TypeScript). This selection will be saved in a configuration file (express-manager-config.json) in your project directory.

Example Directory Structure

After generating files, your directory structure will look like one of these, depending on your chosen organization mode:

  • By Module: Groups related files (model, controller, router) for each module in its own directory.

project-directory/
│
├── user/
│   ├── user.model.js
│   ├── user.controller.js
│   └── user.router.js
│
├── express-manager-config.json
│
└── ...
  • By Type: Separates files into directories based on their type (models, controllers, routers).
project-directory/
│
├── models/
│   ├── user.model.js
│   └── product.model.js
│
├── controllers/
│   ├── user.controller.js
│   └── product.controller.js
│
├── routers/
│   ├── user.router.js
│   └── product.router.js
│
├── express-manager-config.json
│
└── ...

License

This project is licensed under the ISC License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.

Contact

For any inquiries or feedback, please contact the author.