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

make-express-api

v1.0.5

Published

'make-express-api' is a cli tool which help back-end developers to generate express api faster. By writing a single line of code, developer will be able to create CRUD api for a specific module. This tool not only will generate the API, it will take care

Downloads

5

Readme

Make-Express-API

**********{ make-express-api }**********

"make-express-api" is a cli tool which help back-end developers to generate express api faster. By writing a single line of code, developer will be able to create CRUD api for a specific module. This tool not only will generate the API, it will take care of proper folder structure as well as versioning system. By default the rest api is designed by following "Rechardson standard level". Right now user won't be able to change it whether they are rewriting the api response.

Contribute

This is an open source project. Anybody can contribute with this project. If any of you want to contribute with this project to help express developer community, you guys are welcome.

Authors

Hi, I am Muhimenul Tareque, who developed the entire system inspired by RoR scaffold system. To know more you can visit the link bellow. Thank you.

How to use

It is very simple to use this application. To use this application just follow the instructions mentioned bellow:

  • Download the package within your express project
npm i make-express-api
  • Create a config file called scaffold.config.js at root directory of your project.
  • Add this with package.json
"scripts": {
  "scaffold": "create-scaffold"
}
  • Add the following option into the config file.
module.exports = {
    language: "js", // value=> js
    folders: {
        route: "routes", // routig folder name
        controller: "controllers", // controller folder name
        service: "repositories" //service folder name
    }

};
  • If you done the step written above, you are good to make api's using make-express-api app.

  • Open your terminal and run the following command from the root of the project directory. npm run scaffold -- -v <version> -m <module_name> Example: npm run scaffold -- -v v1 -m books

  • Now your API's are ready. It's time to connect the api with main file.

  • Open your main file index.js or app.js and import the router from the route file.

  • Add app.use('books/v1/', booksRouter)

Limitations

The application has some limitations, as you are going to use this, you should keep it mind:

  • Till now, the application only able to create CRUD for a module.
  • You won't abe to create a single api.
  • If already exist any module wihtin the same, the existing one will be replaced.

Next Version

The upcoming Version will solve the current limitations. Like:

  • Developer will be able to create a single api's;
  • Developer will be able to generate custom structure;