{"id":19701425,"url":"https://github.com/frontendmasters/intro-node-js","last_synced_at":"2025-05-16T07:05:27.072Z","repository":{"id":33494447,"uuid":"152273271","full_name":"FrontendMasters/intro-node-js","owner":"FrontendMasters","description":"[Course] Code for Introduction to Node.js","archived":false,"fork":false,"pushed_at":"2024-03-01T20:53:37.000Z","size":197,"stargazers_count":373,"open_issues_count":20,"forks_count":896,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-08T16:08:44.237Z","etag":null,"topics":["exercises","node","nodejs"],"latest_commit_sha":null,"homepage":"https://frontendmasters.com/courses/node-js/","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/FrontendMasters.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":"2018-10-09T15:13:20.000Z","updated_at":"2025-03-10T10:45:29.000Z","dependencies_parsed_at":"2025-02-24T03:10:41.728Z","dependency_job_id":"1171a862-7800-4b84-8973-29f74f0169a7","html_url":"https://github.com/FrontendMasters/intro-node-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fintro-node-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fintro-node-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fintro-node-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fintro-node-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrontendMasters","download_url":"https://codeload.github.com/FrontendMasters/intro-node-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485059,"owners_count":22078767,"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":["exercises","node","nodejs"],"created_at":"2024-11-11T21:08:52.037Z","updated_at":"2025-05-16T07:05:22.065Z","avatar_url":"https://github.com/FrontendMasters.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]\n\u003e This repo is from an archived version of the course. Watch the latest version of the course on [frontendmasters.com](https://frontendmasters.com/courses/node-js-v3/).\n\n# Intro to Nodejs\n\u003e Scott Moss \u0026 Frontend Masters\n- [Resources](#resources)\n- [Course](#course)\n- [Exercises](#exercises)\n  - [Installing Node](#installing-node)\n  - [Modules (node vs browser)](#modules-node-vs-browser)\n  - [CLI (npm)](#cli-npm)\n  - [API (async code)](#api-async-code)\n  - [Debugging \u0026 Testing](#debugging--testing)\n  - [Sharing and Deploying](#sharing-and-deploying)\n\n## Resources\n* [Slides](https://slides.com/scotups/deck/fullscreen)\n* [Nodejs](https://nodejs.org/en/)\n* [NVM](https://github.com/creationix/nvm)\n* [Heroku](https://heroku.com)\n* [NPM](https://www.npmjs.com/)\n\n## Course\nThanks for taking the [Introduction to Node.js course](https://frontendmasters.com/courses/node-js/) -- the course has two parts: slides and exercises. The slides describe the exercises in detail. Each exercise have a folder.\n\n## Exercises\n\n### Installing Node\nInstall node with [node version manager (NVM)](https://github.com/creationix/nvm#installation). NVM was created by the community and not the Nodejs foundation. However, it is the recommended approach. After installing nvm, use nvm to install the lates version of Nodejs, which at this time is `10` and set it to the default version\n```bash\nnvm install node # node is an alias for the latest version\nnvm alias default node\n```\nIf this fails, or you want to install nodejs from nodejs source, [then go here](https://nodejs.org/en/)\n\nImportant: After installing node, please run `npm install i` or `npm install` to install the dependencies located in the `package.json` file (utilized in future exercises).\n### Modules (node vs browser)\n* location - `exercises/modules`\n* commands\n  * test - `npx jest`\n\nThis exercise will have you convert some JavaScript written for the browser, so that it works with node.\n- [ ] checkout to start branch\n- [ ] check the README on how to run test (will talk later about that command)\n- [ ] fix and convert the 3 js files in the exercises/modules/browser to Nodejs JavaScript and place them in exercises/modules/node\n- [ ] ensure all tests pass by running test command again\n### CLI (npm)\n* location - `exercises/cli`\n* commands\n  * new - `node exercises/cli/index.js new`\n  * list - `node exercises/cli/index.js list`\n\nYou'll be creating a CLI program that saves and retrieves contacts from and address book. The program is partially there, however, you must install some remote modules, and use the fileSystem to get some things to work.\n\n- [ ] install all remote modules (hint: use npm)\n- [ ] check the README on how to run your CLI\n- [ ] Fix the CLI so that the \"new\" command works by saving contacts to contacts.json\n- [ ] Fix the CLI so that the \"list\" command works by listing all contacts and allowing you to select one, the prints out the selected contact\n### API (async code)\n* location - `exercises/api`\n* commands\n  * start the server - `node exercises/api/server.js`\n\nYou'll be refacoring and fixing a simple static asset server. The server uses blocking sync code and crashes whenever a request comes in that is asking for an asset that is not found. Neither of those are desirable. You'll also have to teach the server how to server the assets it has in the `assets` folder.\n\n- [ ] install all remote modules (hint: use npm)\n- [ ] check the README on how to run your server\n- [ ] refactor the sync file reading code to be async with a callback, promise, or async await\n- [ ] prevent the server from crashing when an assets is not found. Instead, respond with a 404 status code\n- [ ] create some sort of router logic to handle incoming requests for assets\n### Debugging \u0026 Testing\n* location - `exercises/testing`\n* commands\n  * start the server - `node exercises/testing/index.js`\n  * test - `npm test` or `yarn test` or `npx jest`\n\nYou have to debug and track down some issues in a small app. Use your logging and inspector to find them. Try and fix them, once you do, write some test to make sure it stays fixed 👌🏾😎💯\n\n- [ ] checkout to start branch\n- [ ] check the README on how to execute this program and run test\n- [ ] there are 3 bugs, find them and fix them\n- [ ] write some unit test with Jest to make sure those bugs stay fixed. Refactor the code if you have to\n### Sharing and Deploying\nDeploy one of the exercises to heroku (server) or npm (cli)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrontendmasters%2Fintro-node-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrontendmasters%2Fintro-node-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrontendmasters%2Fintro-node-js/lists"}