{"id":19959940,"url":"https://github.com/quiddlee/node-crud-api","last_synced_at":"2026-05-06T16:03:40.852Z","repository":{"id":221667602,"uuid":"749705536","full_name":"Quiddlee/node-crud-api","owner":"Quiddlee","description":"💚 Node.js CRUD API | The Rolling Scopes School task","archived":false,"fork":false,"pushed_at":"2024-02-14T11:25:44.000Z","size":359,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-12T07:36:19.148Z","etag":null,"topics":["crud-api","mvc","nodejs","rest-api","rs-school"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Quiddlee.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":"2024-01-29T08:26:57.000Z","updated_at":"2024-02-11T20:24:38.000Z","dependencies_parsed_at":"2024-02-14T12:37:21.412Z","dependency_job_id":null,"html_url":"https://github.com/Quiddlee/node-crud-api","commit_stats":null,"previous_names":["quiddlee/node-crud-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quiddlee%2Fnode-crud-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quiddlee%2Fnode-crud-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quiddlee%2Fnode-crud-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quiddlee%2Fnode-crud-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quiddlee","download_url":"https://codeload.github.com/Quiddlee/node-crud-api/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241390454,"owners_count":19955339,"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":["crud-api","mvc","nodejs","rest-api","rs-school"],"created_at":"2024-11-13T01:52:14.997Z","updated_at":"2025-11-26T16:03:56.265Z","avatar_url":"https://github.com/Quiddlee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💚 Node CRUD API\n\n*🦥 RS-School task.*\n\n# Getting Started 🚀\nTo run the project locally, you would have to download zip file with the repository or clone it to your computer. ✨\n\n## Setup and Running ⚠️\n\nWhat things do you need to do in order to run our project locally? 🤔\n\n* Use node 20 LTS ⚡\n* Installed [.git](https://git-scm.com/) on your computer. ✌️\n* Code Editor of your choice. 📝\n* Installed [npm](https://www.npmjs.com/). 📦\n\n## Installation And Preparation 🔮\n\nFirst make sure you have all the things listed in the previous section. Then clone our repository to your computer: 👌\n\n```\ngit clone https://github.com/Quiddlee/node-crud-api.git\n```\n\nor download zip file manually with our repository.\n\nNavigate into project folder and run 📦:\n\n```\nnpm install\n```\n\nCreate ```.env``` file in the root of the project and add all necessary variables 🔥.\n\nYou can find ```.env.example``` as an example file in the project root or follow the lines below 🐺:\n\n```dotenv\nPORT=YOUR_PORT\nHOST=YOUR_HOST\n```\n\nFinally run a development server: 🤩\n```\nnpm run start:dev\n```\nAaaaand you're done! 🎉🥳\n\n## Available Scripts 🥑\n\nHere you can find all the scripts that are available in our project. 🦚\n\nStart the app in `base` mode: ✅\n\n```\nnpm run start:dev\n```\n\nStart the app in `multi` mode: 🪭\n\n```\nnpm run start:multi\n```\n\nStart the app in `prod` mode: 🪶\n\n```\nnpm run start:prod\n```\n\nLint the app with `eslint`: 🦚\n\n```\nnpm run lint\n```\n\nLint adn fix the app errors with `eslint`: 🐨\n\n```\nnpm run lint:fix\n```\n\nFormat the App with **Prettier**: 🧹\n\n```\nnpm run format\n```\n\nFormat the App with **Prettier** fix: 🍃\n\n```\nnpm run format:fix\n```\n\nType check the App with **TypeScript**: 🦁\n\n```\nnpm run type-check\n```\n\nRun unit-tests with  **Vitest**: 🧪\n\n```\nnpm run test\n```\n# Working with API 🐳\nIn the project root folder, you can find a Postman collection that will make your life easier while working with the API. 😉\n\n![postman.jpg](./public/postman.jpg)\n\n## API endpoints 🦉\nThe API has the following endpoints:\n\n| Method  |    Endpoint    |                         Description |\n|---------|:--------------:|------------------------------------:|\n| GET\t    |     /users     | Get all the users from the database |\n| GET     |  \t/users/:id   |            \tGet a single user by ID |\n| POST    |    \t/users     |  \tCreate a new user in the database |\n| PUT     |  \t/users/:id   |                \tUpdate a user by ID |\n| DELETE  |  \t/users/:id   |                \tDelete a user by ID |\n\n## Request body 🥑\n\n| Endpoint |    Body    |                                                                                                                     Example |\n|----------|:----------:|----------------------------------------------------------------------------------------------------------------------------:|\n| POST     |   /users   |               \tAn object with the username age and hobbies\t```{\"username\": \"user\", \"age\": 20, \"hobbies\": [\"cooking\", \"sport\"]}``` |\n| PUT      | /users/:id | \tAn object with the updated username age and hobbies\t```{\"username\": \"updated user\", \"age\": 30, \"hobbies\": [\"updated hobbie\"]}``` |\n\n## Response format 🍇\n\n| Field   |        Type         |                                                                  Description |\n|---------|:-------------------:|-----------------------------------------------------------------------------:|\n| status  | \"success\" or \"fail\" |                         \tIndicates whether the request was successful or not |\n| message |       string        | \tin case of failed result the response will contain message why it is failed |\n| data    |   Object or Array   |                                            \tThe data returned by the request |\n\n## Response examples 🍋\n\n**GET /users**\n\n```json\n {\n  \"status\": \"success\",\n  \"data\": {\n    \"users\": [\n      {\n        \"username\": \"user\",\n        \"age\": 20,\n        \"hobbies\": [\"cooking\", \"sport\", \"programming\"]\n      },\n      {\n        \"username\": \"user2\",\n        \"age\": 21,\n        \"hobbies\": [\"sport\", \"programming\"]\n      },\n      {\n        \"username\": \"user3\",\n        \"age\": 22,\n        \"hobbies\": [\"hobbie\"]\n      }\n    ]\n  }\n}\n```\n\n**GET /users/:id Error case**\n\n```json\n {\n  \"status\": \"fail\",\n  \"message\": \"😯 User not found\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiddlee%2Fnode-crud-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquiddlee%2Fnode-crud-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiddlee%2Fnode-crud-api/lists"}