{"id":18576024,"url":"https://github.com/rayxtr/js201_api1","last_synced_at":"2025-05-16T00:34:46.588Z","repository":{"id":84223641,"uuid":"573290771","full_name":"rayxtr/JS201_API1","owner":"rayxtr","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-02T05:33:47.000Z","size":31938,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T15:15:47.106Z","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/rayxtr.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-12-02T05:33:42.000Z","updated_at":"2023-02-13T15:28:57.000Z","dependencies_parsed_at":"2023-05-24T01:00:28.404Z","dependency_job_id":null,"html_url":"https://github.com/rayxtr/JS201_API1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"vivmagarwal/api-construction-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayxtr%2FJS201_API1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayxtr%2FJS201_API1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayxtr%2FJS201_API1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayxtr%2FJS201_API1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rayxtr","download_url":"https://codeload.github.com/rayxtr/JS201_API1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254447830,"owners_count":22072754,"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:23:17.226Z","updated_at":"2025-05-16T00:34:41.558Z","avatar_url":"https://github.com/rayxtr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mock API Server with JWT Authentication\n\n## Installation\n```\nnpm i\n```\n\n## Run the server in development (local) environment\n```\nnpm run dev\n```\n\n## Access the server\n```\nhttp://localhost:9999/\n```\n\n## How to video\nhttps://www.loom.com/share/f4d8c58a0e224aebbbd0d20fbe946928\n\n## Node version\nv16.x\n\n## Deploy to [Cyclic.sh](https://app.cyclic.sh/#/join/vivmagarwal) in 2 minutes.\nhttps://www.loom.com/share/6af88bcc45b74c19845a83457e792964\n\n## Local server in 2 minutes\nhttps://www.loom.com/share/a1b18ff5449e41109d8f6b3bb2e46867\n\n## Resources\n`/cats` 336x\n\n`/users` 50x\n\n`/posts` 500x\n\n`/comments` 5000x\n\n`/photos` 1000x\n\n`/todos` 500x\n\n`/recipeCategories` 14x\n\n`/recipeIngredients` 570x\n\n`/recipes` 284x\n\n`/areas` 25x\n\n`/recipeTags` 73x\n\n\u003chr\u003e\n\nTo access and modify `cats`, you can use any HTTP method:\n`GET` `POST` `PUT` `PATCH` `DELETE` OPTIONS\n\nFor all other routes `GET` is open but all other HTTP methods requires Authentication.\n\nFor the `/orders` route, all methods are protected.\n\n\u003chr\u003e\n\n## Authentication\n### Register a new user \n```\nPOST http://localhost:9999/user/register\nContent-Type: application/json\n\n    {\n    \"username\": \"john.smith\",\n    \"firstname\": \"John\",\n    \"lastname\": \"Smith\",\n    \"email\": \"John@mail.com\",\n    \"password\": \"john.smith\",\n    \"avatar\": \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/304.jpg\"\n    }\n```    \n\n### Login an existing user with password\n```\nPOST http://localhost:9999/user/login\nContent-Type: application/json\n\n    {\n      \"username\": \"john.smith\",\n      \"password\": \"john.smith\"\n    }\n```\n\n###\n\n## More examples\nhttps://github.com/vivmagarwal/mock-api-server-with-JWT-authentication/blob/main/server.rest\n\n## VSCode extension to make API calls from the .rest file\nhttps://marketplace.visualstudio.com/items?itemName=humao.rest-client \n\n## Change port\nUpdate `PORT=3000` in the `.env` file before `npm start`.\n\n## Add Custom Routes \u0026 Protected Routes\nhttps://www.loom.com/share/f4d8c58a0e224aebbbd0d20fbe946928","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayxtr%2Fjs201_api1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frayxtr%2Fjs201_api1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayxtr%2Fjs201_api1/lists"}