Minimal express api generator
npm install express-draft``bash-. _ (
('-. ) (-. \
_( OO) ( OO ). ( (OO )
(,------.(_/. \_)-._.
| .---' \ .' /(__...--''---. / .'. \ | |
| | \ /\ | / | |
(| '--. \ \ | | |_.' |
| .--' .' \_)| .___.'
|
------''--' '--'--'
``
This is a no nonsense and minimal Express.js application generator, which is can be used as a starting point for any express application.
`bash`
$ npm install -g express-draft
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.
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:
`bash`
$ exp .
$ npm run dev
OR, create (and start) the app (in myApp folder):
`bash`
$ exp myApp
$ cd myApp
$ npm run dev
This will basically create this structure in your folder
`bash``
.
āāā .env
āāā app.js
āāā node_modules
āāā package-lock.json
āāā package.json
āāā routes
āāā api.route.js
This is how easy it is to get going.
- express - express framework
- dotenv - for env variables
- http-errors - to create http errors
- morgan - to log http requests
- nodemon (dev) - monitors changes in files
Actually NONE is required š as of now, incase I continue this project OR I'll get requests then certainly this is not the end.
https://youtube.com/c/yourstruly267
https://paypal.me/trulymittal
You can fork this repo and send me a PR.