{"id":18572724,"url":"https://github.com/truecodersio/nodejs-lab","last_synced_at":"2025-04-10T07:31:34.104Z","repository":{"id":43973798,"uuid":"248821013","full_name":"truecodersio/nodejs-lab","owner":"truecodersio","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-10T22:19:18.000Z","size":30,"stargazers_count":0,"open_issues_count":3,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-30T05:29:18.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/truecodersio.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}},"created_at":"2020-03-20T18:04:08.000Z","updated_at":"2022-09-30T21:53:49.000Z","dependencies_parsed_at":"2023-01-26T09:35:12.907Z","dependency_job_id":null,"html_url":"https://github.com/truecodersio/nodejs-lab","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/truecodersio%2Fnodejs-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnodejs-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnodejs-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnodejs-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truecodersio","download_url":"https://codeload.github.com/truecodersio/nodejs-lab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223430279,"owners_count":17143624,"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":[],"created_at":"2024-11-06T23:07:03.334Z","updated_at":"2024-11-06T23:07:03.938Z","avatar_url":"https://github.com/truecodersio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodejs-lab\n\nOBJECTIVES\n\nPART 1\nCreate a NodeJS project using npm init.\nCreate a folder in your project called server.\nCreate a JavaScript file in the server folder named server.js.\nIn server.js\nImport (require) path and fs.\nCreate an array consisting of at least 5 chirp objects.\nWrite the array to a file in the root of the project called chirps.json.\nAdd code to server.js that reads the file and outputs the chirps to the console\n\nPART 2\nInstall request-promise from npm and save it to your package.json file.\nCreate a JavaScript file in the root of your project called reddit.js.\nUse request-promise to retreive articles from https://reddit.com/r/popular.json.\nExtract from each article title, url, and author\nPush each extracted article to an array.\nWrite the array to a file in the root of your project called popular-articles.json.\n\nADVANCED\nCreate a JavaScript file named popular-downloader.js.\nCreate a directory in the root of your project named downloads.\nUsing request-promise, pull articles from https://reddit.com/r/popular.json.\nIf the article is a .jpg, .gif, or a .png (hint):\nUse request-promise to download the media.\nWrite each download to a file (named the id of the article) in the downloads directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruecodersio%2Fnodejs-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruecodersio%2Fnodejs-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruecodersio%2Fnodejs-lab/lists"}