Giter Site home page Giter Site logo

dzzirima / bootstrap-express-api-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iamgideonidoko/bootstrap-express-api-app

0.0 0.0 0.0 26 KB

A CLI tool for quickly bootstrapping a Node/Express API application.

License: MIT License

JavaScript 100.00%

bootstrap-express-api-app's Introduction

Bootstrap Express API App

...quick bootstrapping tool.

Bootstrap Express API App is a CLI tool that understands the need for speed and helps to quickly scaffold node.js/express API application boilerplate.

Installation

You'll need to have Node.js installed on your local development machine.

Using npm (the recommended way):

Local Installation (Recommended)

With a local installation, bootstrap-express-api-app will not be available in your system path. Instead, the local installation can be run by using npx bootstrap-express-api-app.

# initiate setup
npx boostrap-express-api-app

# after setup is complete
cd [app-name]
npm run server

The server will run on port 5000. Go to http://localhost:5000/ to see your app.

Using the Local Installation will ensure that you are using the latest version of the tool.

Global Installation

Run the below in your terminal.

# install globally
npm install -g bootstrap-express-api-app

And Bootstrap Express API App will be installed globally to your system path.

In your terminal still, run the following to kick-start the setup.

# initiate setup
bootstrap-express-api-app

# after setup is complete
cd [app-name]
npm run server

The server will run on port 5000. Go to http://localhost:5000/ to see your app.

Boilerplate Structure

Bootstrap-Express-API-App will create a directory called [app-name] (or whatever you name your app) inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:

[app-name]
├── node_modules
├── package.json
├── .gitignore
├── .env
├── vercel.json
├── info.txt
├── index.js
|
├── config
│   └── keys.js
|
├── controllers
│   ├── authController.js
│   ├── blogController.js
│   └── userController.js
|
├── middleware
│   └── auth.js
|
├── models
│   ├── BlogPost.js
│   └── User.js
|
└── routes
    └── api
	    ├── auth.js
	    ├── blogposts.js
	    └── users.js

No configuration or complicated folder structures, only the files you need to build your API app.
Once the installation is done, you can open your project folder:

cd [app-name]

Inside the newly created project, you can run some built-in commands:

npm start

Runs the app in development mode but without the Nodemon's restart feature.

npm run server

Runs the app in development mode with restart feature.
Open http://localhost:5000 to view it in the browser.

The server will automatically restart if you make changes to the code.
You will see the errors & warnings in the console.

What’s Included?

Your setup project will have almost everything you need to build a clean API application:

  • Vercel config, so you can easily deploy to your API app to Vercel.
  • MVC file structure.
  • MongoDB ORM integration (Mongoose).
  • Authentication setup.
  • A development server that warns about common mistakes (Nodemon).

Contributing

I'd love to have your helping hand on bootstrap-express-api-app! If you happen to find any bug while using this tool or you have a feature request, do well to create an issue.

License

Bootstrap Express App is open source software licensed as MIT.

Author

Gideon Idoko

bootstrap-express-api-app's People

Contributors

iamgideonidoko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.