It's been almost 4years since I have been writing nodejs, it's been really cool, but at times - when starting a new project - I need to do the same things again and again, for example, adding eslint, prettier, GitHub, swagger, and mocha - All these are now sort of necessary for an app.So I simplified it for myself (and for you - it's public), I have created a nodejs API template on Github you can use it to create a ready to code like environment.Features:Express app optimized to make better APIsChanged structure to fit the API only use caseRemoved view and public folderAdded error handling without HTML/templating enginesAdded test route to understand the file structure and code splittingDatabase connection using mongoose, based on environment (production-ready)Environment variable to help you control the app environment using dotenvSwagger for API documentationPre-configured husky to run eslint and prettier on the pre-commit hook, helps maintain best practicesAutomatic versioning for apps on git push, using yarnTests pre-configured using mocha and chaiHere are things you can do:
Submitted August 01, 2020 at 07:04AM by raj_chandra3
No comments:
Post a Comment