{"id":18572719,"url":"https://github.com/truecodersio/node-exercise","last_synced_at":"2025-08-13T20:04:44.419Z","repository":{"id":110388402,"uuid":"536672089","full_name":"truecodersio/node-exercise","owner":"truecodersio","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-20T14:04:30.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":86,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T20:45:40.646Z","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-14T16:40:26.000Z","updated_at":"2022-09-30T21:51:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7267736-415e-45e2-9f33-c05d6cf1fb0f","html_url":"https://github.com/truecodersio/node-exercise","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/truecodersio/node-exercise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnode-exercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnode-exercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnode-exercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnode-exercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truecodersio","download_url":"https://codeload.github.com/truecodersio/node-exercise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2Fnode-exercise/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305057,"owners_count":24562087,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:02.243Z","updated_at":"2025-08-13T20:04:44.371Z","avatar_url":"https://github.com/truecodersio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Exercise Repo\n\n## Getting Started\n\nThis project is configured with babel so that you can use ES6 Module syntax. It's also bootstrapped for you with extra basic development tools so to get started, be sure to install all dependencies with `npm install`.\n\n## Running the Development Server\n\nTo run the development server, use `npm run dev`.\n\nThis will re-transpile and restart the server with babel and nodemon.\n\n## Running the Server\n\nTo run the server outside of development, use `npm start`.\n\nThis will transpile the server code with babel and start the server with node.\n\n## Project Structure\n\nThis project is bootstrapped with files to get started, files for configuration and files for mock database queries. You will only be working in `server.js`, `routes/`, and `config/`.\n\n```txt\nconfig/\n    index.js\nmockdb/\nroutes/\n    index.js\n.babelrc\n.env.template\n.gitignore\npackage-lock.json\nserver.js\n```\n\n## Config\n\nThe `config/` folder is used to load and export node environment variables. Currently, it uses the `dotenv` package to load the environment variables when you start the server process, and exports them under `mysql` and `port`.\n\n`port` will be used to set the express server to listen on the specified port number.\n\n`mysql` will be used later to set up a connection to a MySQL database.\n\n### .env File\n\nThere is a `.env.template` file in the root directory. You will need to create a local `.env` file and copy the contents of the `.env.template` file in to `.env`. Be sure to change the `PORT` value to `PORT=5000`. The `DB_` values will be changed in a later lesson.\n\n## MockDB\n\nThe `mockdb/` folder contains a mock service for interacting with user data.\n\n- The `getAll` method returns the data list\n- The `getOne` method takes in an user object id parameter and returns a single user data object\n- The `add` method takes in an user object parameter and adds it to the data list\n- The `update` method takes in an user id and object as parameters and updates one user object in the data list\n- The `delete` method takes in an user id parameter and removes one user object the data list\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruecodersio%2Fnode-exercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruecodersio%2Fnode-exercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruecodersio%2Fnode-exercise/lists"}