👨🏼‍💻

khriztianmoreno's Blog

Home Tags About |

Structuring the base of our NodeJS project

Published at 2020-01-10
Updated at 2020-01-10
Last update over 365 days ago Licensed under MIT nodejsexpressjsscaffoldingapijavascript

The idea of writing this article came from a need that arose at a meetup in the city I attended. Many of the people there were asking how they would know where the files that make up their project should be, such as: models, events, controllers, views, etc. Since in Node.JS there was no base way to do it and many of the visible examples never substantiated the reason why it was built that way.

That is why I decided to create a simple base project that allows me to have local authentication using Passport.JS persisting the data in a NoSQL database like MongoDB, through Mongoose.JS, it also uses JWT and exposes an API that could be easily extended.

This project was accompanied by a talk that I shared at the meetup *Test with AVA and Structuring the base of our project where I explained the step-by-step process of how to Structure a NodeJS Project with ExpressJS for an API, here is the link to the project https://github.com/khriztianmoreno/nodejs-scaffolding and you are invited to generate pull requests, create issues and improve this project as a community.

NodeJS Medellin Meetup — Structuring the base of our projectNodeJS Medellin Meetup — Structuring the base of our project

Plus:

Here is the step-by-step guide on how to build the project that can be used to replicate it in your future projects. Gist

Resource:

I hope this has been useful and/or taught you something new!

Profile

@khriztianmoreno 🚀