This was a challenge of a course to create a blog using just Nodejs.
This code was written in 2019 when I was getting to know NodeJs, although today I wouldn't choose to write the code that way, it served as a lot of learning.
- NodeJs for back-end;
- Express for productivity back-end routes;
- MongoDB for NoSQL database;
- Mongoose for productivity database queries;
- Dotenv for security keys;
- Multer for uploading images;
- Mustache-express for front-end web;
- Nodemailer for productivity send email;
- Passport for authorization sessions.
The challenge was to create a blog. In this challenge, there is a home page showing the posts that a user has registered, in addition to the exclusive page of the post and a filter per query of the tag url of each post. In addition, the user can log in and out of his account, add and edit posts, change and recover password. Posts can contain an image, text and tags. The images are sent to a folder at the root of the system and is called by the url saved in the database. MongoDB was chosen for the database, a NoSQL bank with excellent performance and Mongoose was chosen as its ORM. The front-end part was made with Mustache, coupled with the back-end.
It was quite exciting to see one of my first NodeJ codes working. Several hours were dedicated to this learning. Seeing the code a few months later, I can already imagine it in another way, including the best practices of writing JS. In this challenge I learned a lot about Nodemon, Mongoose and Express, incredible tools to increase productivity. He was also one of the first contacts with MongoDB and data processing and image upload. I learned a lot with sending emails using Nodemailer. I really enjoyed working with Mustache on the front end, an easy and quick tool to use.
Although styling was not the focus of this challenge, I decided to give it a little time to bring it to Github.
I'm making this code available with the MIT License for the community to use as they prefer.