0.0.2 ā€¢ Published 1 year ago

nodee-api v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago
   ('-.  ) (`-.       _ (`-.
 _(  OO)  ( OO ).    ( (OO  )
(,------.(_/.  \_)-._.`     \
 |  .---' \  `.'  /(__...--''
 |  |      \     /\ |  /  | |
(|  '--.    \   \ | |  |_.' |
 |  .--'   .'    \_)|  .___.'
 |  `---. /  .'.  \ |  |
 `------''--'   '--'`--'

Express API Scaffolding (express-draft)

This is a no nonsense and minimal Express.js application generator, which is can be used as a starting point for any express application.

Installation šŸ­

$ npm install -g express-draft

Why another express generator ā“

  1. This generates the API scaffolding with the error handler āš ļø, which is always a good idea.

  2. Only installs the bare bones šŸ’€ and "mostly" required dependencies whenever you try to start a new express application.

Quick Start šŸƒā€ā™‚ļø

The quickest way to get started with express is to utilize the executable exp (OR express-draft) to generate an application as shown below:

Create (and start) the app in current folder:

$ exp .
$ npm run dev

OR, create (and start) the app (in myApp folder):

$ exp myApp
$ cd myApp
$ npm run dev

This will basically create this structure in your folder

.
ā”œā”€ā”€ .env
ā”œā”€ā”€ app.js
ā”œā”€ā”€ node_modules
ā”œā”€ā”€ package-lock.json
ā”œā”€ā”€ package.json
ā””ā”€ā”€ routes
    ā””ā”€ā”€ api.route.js

This is how easy it is to get going.

A picture is worth a thousand words.

What dependencies it installs ?

  • express - express framework
  • dotenv - for env variables
  • http-errors - to create http errors
  • morgan - to log http requests
  • nodemon (dev) - monitors changes in files

Command Line Options

Actually NONE is required šŸ˜Š as of now, incase I continue this project OR I'll get requests then certainly this is not the end.

Author āœļø

Truly Mittal šŸ‡®šŸ‡³

YouTube šŸ“ŗ

https://youtube.com/c/yourstruly267

Donations šŸ’°

https://paypal.me/trulymittal

License šŸŽ«

MIT

Contribute šŸ¤

You can fork this repo and send me a PR.