{"id":26417970,"url":"https://github.com/yogain123/mock-backend","last_synced_at":"2025-03-18T01:16:36.545Z","repository":{"id":42996539,"uuid":"197022069","full_name":"yogain123/Mock-Backend","owner":"yogain123","description":"Mocking Backend Server","archived":false,"fork":false,"pushed_at":"2022-12-10T22:29:53.000Z","size":588,"stargazers_count":10,"open_issues_count":9,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-16T23:56:58.303Z","etag":null,"topics":["json","json-server","nodejs"],"latest_commit_sha":null,"homepage":"","language":null,"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/yogain123.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":"2019-07-15T15:09:55.000Z","updated_at":"2023-07-17T16:34:55.000Z","dependencies_parsed_at":"2023-01-26T09:45:29.984Z","dependency_job_id":null,"html_url":"https://github.com/yogain123/Mock-Backend","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/yogain123%2FMock-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogain123%2FMock-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogain123%2FMock-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogain123%2FMock-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yogain123","download_url":"https://codeload.github.com/yogain123/Mock-Backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135892,"owners_count":20403798,"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":["json","json-server","nodejs"],"created_at":"2025-03-18T01:16:35.952Z","updated_at":"2025-03-18T01:16:36.532Z","avatar_url":"https://github.com/yogain123.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"How do we Use it \n-------\nWorking as a frontend engineer and building a dummy or proof-of-concept project without a complete backend might be very challenging to set up REST API’s. \nYou can use Firebase or many other things to setup backend without writing much code. BUT,\nThere is a way to set up an incredibly simple backend server running on your localhost. \nIt will be a Node project.\nLet’s assume you have a frontend, we can create a backend server using an NPM module json-server.\nLet name your node project “FakeBackend”.\n\n**Steps:**\n\n- Make a directory FakeBackend\n- cd FakeBackend\n- npm init\n- Follow the setup CLI by providing basics info for you Node project\n- npm install json-server -g\n- Make a db.json file. Run touch db.json\n- You need to watch that file\n- In package.json write a start script as =\u003e json-server -p 3007 -w db.json\n- Put your JSON in db.json\n- npm start\n\nThat is all you have to do if you want to set up a fake backend server :)\n\n**Making an API call from POSTMAN**\n\n**GET ::: localhost:3007/profile**\n```\n{\n  \"name\": \"yogendra\",\n  \"age\": 25,\n  \"country\": \"INDIA\",\n  \"profession\": \"Engineer\"\n}\n```\n\nIf you make a POST call, then data will automatically get updated in db.json.\n\n**Fork, Star and contribute**\n\n## How to Run\n```\nnpm install\nnpm start\nor\nnpx json-server -p 3007 -w db.json\n```\n\n## Author\nYogendra Saxena\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogain123%2Fmock-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyogain123%2Fmock-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogain123%2Fmock-backend/lists"}