{"id":19391282,"url":"https://github.com/equimper/youtube-makeanodejsapi","last_synced_at":"2025-07-11T15:38:34.979Z","repository":{"id":84189459,"uuid":"91619410","full_name":"EQuimper/youtube-makeanodejsapi","owner":"EQuimper","description":"Youtube tutorial for making a NodeJS REST API with MongoDB","archived":false,"fork":false,"pushed_at":"2017-06-17T01:22:15.000Z","size":76,"stargazers_count":50,"open_issues_count":2,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-07T17:35:34.480Z","etag":null,"topics":["api","joy","jwt","mongodb","nodejs","passport","rest-api","tutorial","webpack","youtube"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/playlist?list=PLzQWIQOqeUSMzMUEJA0XrOxJbX8WTiCJV","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EQuimper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-17T20:56:03.000Z","updated_at":"2024-11-21T10:53:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f6776c3-24c0-4889-8133-ea71764d0f3e","html_url":"https://github.com/EQuimper/youtube-makeanodejsapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EQuimper/youtube-makeanodejsapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EQuimper%2Fyoutube-makeanodejsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EQuimper%2Fyoutube-makeanodejsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EQuimper%2Fyoutube-makeanodejsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EQuimper%2Fyoutube-makeanodejsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EQuimper","download_url":"https://codeload.github.com/EQuimper/youtube-makeanodejsapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EQuimper%2Fyoutube-makeanodejsapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264841967,"owners_count":23671907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","joy","jwt","mongodb","nodejs","passport","rest-api","tutorial","webpack","youtube"],"created_at":"2024-11-10T10:25:59.475Z","updated_at":"2025-07-11T15:38:34.921Z","avatar_url":"https://github.com/EQuimper.png","language":"JavaScript","readme":"# Make a NodeJS rest api\n\n## Why do this tutorial\n\nI was searching a long time ago about how to make my own boilerplate for nodejs. I hate when I take something from someone else and don't know what happen.\n\nI create this tutorial for helping people to make their own rest api and maybe use it as your boilerplate\n\n## Features\n\nThis rest api gonna be for a Medium like website. This is a simple blog place where people can follow author and create a post. People can like the post and get notification when a user they follow create a new one.\n\n- Authentication local + jwt\n- User can create a post\n- User can delete is own post and update it\n- User can follow an other one\n- User get notification on following new post\n- User can like a post\n- User can see all the post they like\n\n## Tech use\n\nI use the latest feature of javascript. ES6 + ES7, we compile with the help of babel and webpack v2.\n\n---\n\n### Part 1, Setup the tools\n\n#### Video\n\n[Link](https://youtu.be/UL66bwInJHY)\n\n#### To add\n\n- editorconfig\n- express\n- eslint\n- babel\n- webpack 2\n\n---\n\n### Part 2, Setup of the middlewares and mongodb\n\n#### Video\n\n[Link](https://youtu.be/PuY3w1VY0z8)\n\n- Add mongoose, body-parser, morgan, compression, helmet\n- Setup config folder\n- Setup constants\n\n---\n\n### Part 3, Users creation\n\n#### Video\n\n[Link](https://youtu.be/i5yb_HRWbeg)\n\n- Create the user model, controller and routes\n- Install robomongo, postman\n- Add joi for validation with express-validation\n\n---\n\n### Part 4, Add bcrypt and passport\n\n#### Video\n\n[Link](https://youtu.be/iBnLWrw3NpY)\n\n- Add rimraf and clean dist on webpack build\n- Crypt the user password\n- Create the localStrategy with passport\n- Can log a user\n\n---\n\n### Part 5, Add passport-jwt and send less information about the user\n\n#### Video\n\n[Link](https://youtu.be/fVq3VFjASqY)\n\n- Create a secret password for the jwt\n- Add passport-jwt and create the strategy\n- Add jsonswebtoken library\n- How can I send less info to the front end ? Like I don't want to send the password\n\n---\n\n### Part 6, Creation of a post\n\n#### Video\n\n[Link](https://youtu.be/3zfPrFy9ZQY)\n\n- Create the post model\n- Add the user id as the author\n- Resolve error I did with joi\n\n---\n\n### Part 7, Get a post by his id\n\n#### Video\n\n[Link](https://youtu.be/jOtsq343AgM)\n\n- Create the controller, route\n- Add http-status library\n- Populate User\n- User toAuthJSON vs toJSON\n\n---\n\n### Part 8, Get all posts with a list statics method\n\n#### Video\n\n[Link](https://youtu.be/PKkaVz6aMws)\n\n- Talk about the repos\n- Create the controller\n- Create a list statics method on post\n\n---\n\n### Part 9, Update a post if author of it\n\n#### Video\n\n[Link](https://youtu.be/GUlbkmxhg_k)\n\n- Create the route and controller\n- Create a validation field\n\n---\n\n### Part 10, Delete a post if author of it\n\n#### Video\n\n[Link](https://youtu.be/0lrzX_nWvAA)\n\n- Create the route and controller\n- Show the authorization work\n- Add prettier and show the magic :)\n\n---\n\n### Part 11, User can favorite a post if auth + increment the favoriteCount\n\n#### Video\n\n[Link](https://youtu.be/VeNWdciXVQ0)\n\n- Create model methods for both user and post\n- Add the increment/decrement statics on post\n\n### Part 12, Send if favorite or not with post for help the life of the front-end\n\n#### Video\n\n[Link](https://youtu.be/tuftcAdw8yc)\n\n- Make route auth\n- Make user method\n- Make post controller work with the favorite","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequimper%2Fyoutube-makeanodejsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequimper%2Fyoutube-makeanodejsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequimper%2Fyoutube-makeanodejsapi/lists"}