{"id":26486832,"url":"https://github.com/luismr/quick-json-server","last_synced_at":"2026-04-13T15:31:10.656Z","repository":{"id":145600776,"uuid":"435984063","full_name":"luismr/quick-json-server","owner":"luismr","description":"Node App stub to run the JSON-Server into a full REST service without spending a lot of time to create the service to connect into a database, marshal the resultset into a readable json, etc ...","archived":false,"fork":false,"pushed_at":"2021-12-07T18:45:28.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T06:33:11.461Z","etag":null,"topics":["json","mock","node","nodejs","rapid-development","rapid-prototyping","rapidapi","rest"],"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/luismr.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":"2021-12-07T18:19:41.000Z","updated_at":"2021-12-07T18:45:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2018ed1-8fe4-49c3-9143-6bb23a20d755","html_url":"https://github.com/luismr/quick-json-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/luismr/quick-json-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismr%2Fquick-json-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismr%2Fquick-json-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismr%2Fquick-json-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismr%2Fquick-json-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luismr","download_url":"https://codeload.github.com/luismr/quick-json-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismr%2Fquick-json-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31759194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["json","mock","node","nodejs","rapid-development","rapid-prototyping","rapidapi","rest"],"created_at":"2025-03-20T06:30:03.243Z","updated_at":"2026-04-13T15:31:10.637Z","avatar_url":"https://github.com/luismr.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# quick-json-server\n\nNode App stub to run the [JSON-Server](https://www.npmjs.com/package/json-server) into a full REST service without \nspending a lot of time to create a service to connect into a database, marshal the result set into a readable json, \netc ...\n\n## Requirements\n\n* Node 12+\n\n## Installation\n\n```shell\nnpm install\n```\n\n## Resources\n\nResources are our \"_Tables_\" into JSON model and we can have a lot of them inside into the same JSON file.\n\nJust add into the root of this project all JSON files named as `db.json` (**_it will be ignored by GIT_**) and the script will publish all them on\nthe JSON-server resources.\n\n```\nPlease also rememeber to follow the JSON good practices using the correct format and conventions.\n```\n\n**Example:**\n\n* _Array of Media_\n\n```json\n{\n  \"media\": [\n    {\n      \"id\": \"film/2021/dec/06/spider-man-no-way-home-uk-record-advance-ticket-sales\",\n      \"type\": \"article\",\n      \"sectionId\": \"film\",\n      \"sectionName\": \"Film\",\n      \"webPublicationDate\": \"2021-12-06T15:59:22Z\",\n      \"webTitle\": \"Spider-Man: No Way Home breaks UK record for advance ticket sales\",\n      \"webUrl\": \"https://www.theguardian.com/film/2021/dec/06/spider-man-no-way-home-uk-record-advance-ticket-sales\",\n      \"apiUrl\": \"https://content.guardianapis.com/film/2021/dec/06/spider-man-no-way-home-uk-record-advance-ticket-sales\",\n      \"fields\": {\n        \"body\": \"\u003cp\u003eThe upcoming Hollywood blockbuster Spider-Man: No Way Home is set to be a box office hit after breaking the UK record for advance ticket sales, which are being snapped up at three times the rate of those for the James Bond movie \u003ca href=\\\"https://www.theguardian.com/film/2021/oct/04/no-time-to-die-james-bond-movie-box-office-daniel-craig-007\\\"\u003eNo Time to Die.\u003c/a\u003e\u003c/p\u003e \u003cp\u003eOdeon, the biggest operator in the UK and Ireland with more than 120 cinemas, said it had sold many more than 200,000 tickets for the film in the first seven days since release.\u003c/p\u003e \u003cp\u003eThe rate of ticket sales to see the film, which stars British actor Tom Holland as Peter Parker, has broken the presale record set by 2019’s Avengers: Endgame. Odeon also said that the Spider-Man presales rate in the first seven days was three times that amassed by Daniel Craig’s \u003ca href=\\\"https://www.theguardian.com/film/2021/sep/24/bondmania-cinemas-hire-extra-staff-ahead-of-no-time-to-die-release\\\"\u003eeagerly anticipated, much delayed and final outing\u003c/a\u003e as James Bond.\u003c/p\u003e \u003cp\u003e“As we head into the festive period, we are really pleased with the advance booking numbers for Spider-Man: No Way Home,” said Carol Welch, managing director of Odeon Cinemas UK and Ireland. “It shows guests are loving being back at cinemas and are excited about the magic that our big screen experience brings to movies.”\u003c/p\u003e \u003cp\u003eThe premiere of the new Bond film, which has made $763m (£576m) in global ticket sales to date, helped to reignite cinemagoing in the UK with the strongest October attendance in a decade.\u003c/p\u003e \u003caside class=\\\"element element-rich-link element--thumbnail\\\"\u003e \u003cp\u003e \u003cspan\u003eRelated: \u003c/span\u003e\u003ca href=\\\"https://www.theguardian.com/business/2021/aug/06/uk-cinemas-covid-closures-admissions\\\"\u003e‘We are pretty bruised’: UK cinemas bounce back from Covid closures\u003c/a\u003e \u003c/p\u003e \u003c/aside\u003e  \u003cp\u003eThis week the film, which is the third-highest grossing movie of all time in the UK and Ireland behind Skyfall and Star Wars: The Force Awakens, will crack the £100m mark domestically, cementing its position as the biggest hit of the year.\u003c/p\u003e \u003cp\u003eAs Bond is a particular favourite of audiences in the UK and Ireland, it performs disproportionately well at the box office, making it a tall order for Spider-Man to eclipse its popularity.\u003c/p\u003e \u003cp\u003eNevertheless, on the global stage the superhero movie is on track to become one of the biggest films since the pandemic hit. AMC, the world’s largest cinema operator and owner of Odeon, said that in the US it had generated the second-busiest ticket sales day ever, after Avengers: Endgame.\u003c/p\u003e \u003cp\u003eUS analysts estimate that its opening weekend is likely to gross at least $150m at the North American box office, which if it does will make it the first film since pre-pandemic 2019 to do so.\u003c/p\u003e \u003cp\u003eTo date, the top two highest grossing films of the year are both Chinese – The Battle at Lake Changjin ($896m) and Hi, Mom ($822m) – with the third and fourth spots taken by No Time To Die ($763m) and F9: The Fast Saga ($726m).\u003c/p\u003e\"\n      },\n      \"isHosted\": false,\n      \"pillarId\": \"pillar/arts\",\n      \"pillarName\": \"Arts\"\n    }\n  ]\n}\n```\n\n## Run\n\n### Using the Books example JSON file\n\nJust ask to `npm` start the service for you\n\n```bash\nnpm run start:books\n```\n\nThen you will see on the console\n\n```shell\nnpm-cli.js run start --scripts-prepend-node-path=auto\n\n\u003e quick-json-server@1.0.0 start\n\u003e json-server --watch $(ls db-*.json)\n\n\n  \\{^_^}/ hi!\n\n  Loading books.json\n  Done\n\n  Resources\n  http://localhost:3000/books\n\n  Home\n  http://localhost:3000\n\n  Type s + enter at any time to create a snapshot of the database\n  Watching...\n```\n### Using your JSON file\n\nJust ask to `npm` start the service for you\n\n```bash\nnpm run start\n```\n\nThen you will see on the console\n\n```shell\nnpm-cli.js run start --scripts-prepend-node-path=auto\n\n\u003e quick-json-server@1.0.0 start\n\u003e json-server --watch $(ls db-*.json)\n\n\n  \\{^_^}/ hi!\n\n  Loading db.json\n  Done\n\n  Resources\n  http://localhost:3000/media\n\n  Home\n  http://localhost:3000\n\n  Type s + enter at any time to create a snapshot of the database\n  Watching...\n```\n\n## Usage\n\n* `GET http://localhost:3000/media`\n  List all Media\n* `GET http://localhost:3000/media/\u003cID\u003e`\n  Retrieve the Media with `id` equals to `\u003cID\u003e`. If the `\u003cID\u003e` is not a **Number** (e.g. 123), **IT MUST BE** \n  URL encoded;  \n* `GET http://localhost:3000/media?webTitle=\u003cVALUE\u003e`. If the `\u003cVALUE\u003e` is a complex String (e.g. _C\u0026A_, or \n  _Aviões \u0026 Música_), **IT MUST BE** URL encoded;   \n  Filter all media by `webTitle` equals to `\u003cVALUE\u003e`.\n* `GET http://localhost:3000/media/\u003cID\u003e/\u003cPROPERTY\u003e`\n  Retrieve just the Media's `\u003cPROPERTY\u003e` field for the matching `\u003cID\u003e`\n* `POST http://localhost:3000/media`\n  Create an entry at the related resource JSON file\n\n## Examples\n\n```shell\ncurl -X GET \"http://localhost:3000/media/film%2F2021%2Fdec%2F06%2Fspider-man-no-way-home-uk-record-advance-ticket-sales\"                     ✔  10139  15:11:14\n{\n  \"id\": \"film/2021/dec/06/spider-man-no-way-home-uk-record-advance-ticket-sales\",\n  \"type\": \"article\",\n  \"sectionId\": \"film\",\n  \"sectionName\": \"Film\",\n  \"webPublicationDate\": \"2021-12-06T15:59:22Z\",\n  \"webTitle\": \"Spider-Man: No Way Home breaks UK record for advance ticket sales\",\n  \"webUrl\": \"https://www.theguardian.com/film/2021/dec/06/spider-man-no-way-home-uk-record-advance-ticket-sales\",\n  \"apiUrl\": \"https://content.guardianapis.com/film/2021/dec/06/spider-man-no-way-home-uk-record-advance-ticket-sales\",\n  \"fields\": {\n    \"body\": \"\u003cp\u003eThe upcoming Hollywood blockbuster Spider-Man: No Way Home is set to be a box office hit after breaking the UK record for advance ticket sales, which are being snapped up at three times the rate of those for the James Bond movie \u003ca href=\\\"https://www.theguardian.com/film/2021/oct/04/no-time-to-die-james-bond-movie-box-office-daniel-craig-007\\\"\u003eNo Time to Die.\u003c/a\u003e\u003c/p\u003e \u003cp\u003eOdeon, the biggest operator in the UK and Ireland with more than 120 cinemas, said it had sold many more than 200,000 tickets for the film in the first seven days since release.\u003c/p\u003e \u003cp\u003eThe rate of ticket sales to see the film, which stars British actor Tom Holland as Peter Parker, has broken the presale record set by 2019’s Avengers: Endgame. Odeon also said that the Spider-Man presales rate in the first seven days was three times that amassed by Daniel Craig’s \u003ca href=\\\"https://www.theguardian.com/film/2021/sep/24/bondmania-cinemas-hire-extra-staff-ahead-of-no-time-to-die-release\\\"\u003eeagerly anticipated, much delayed and final outing\u003c/a\u003e as James Bond.\u003c/p\u003e \u003cp\u003e“As we head into the festive period, we are really pleased with the advance booking numbers for Spider-Man: No Way Home,” said Carol Welch, managing director of Odeon Cinemas UK and Ireland. “It shows guests are loving being back at cinemas and are excited about the magic that our big screen experience brings to movies.”\u003c/p\u003e \u003cp\u003eThe premiere of the new Bond film, which has made $763m (£576m) in global ticket sales to date, helped to reignite cinemagoing in the UK with the strongest October attendance in a decade.\u003c/p\u003e \u003caside class=\\\"element element-rich-link element--thumbnail\\\"\u003e \u003cp\u003e \u003cspan\u003eRelated: \u003c/span\u003e\u003ca href=\\\"https://www.theguardian.com/business/2021/aug/06/uk-cinemas-covid-closures-admissions\\\"\u003e‘We are pretty bruised’: UK cinemas bounce back from Covid closures\u003c/a\u003e \u003c/p\u003e \u003c/aside\u003e  \u003cp\u003eThis week the film, which is the third-highest grossing movie of all time in the UK and Ireland behind Skyfall and Star Wars: The Force Awakens, will crack the £100m mark domestically, cementing its position as the biggest hit of the year.\u003c/p\u003e \u003cp\u003eAs Bond is a particular favourite of audiences in the UK and Ireland, it performs disproportionately well at the box office, making it a tall order for Spider-Man to eclipse its popularity.\u003c/p\u003e \u003cp\u003eNevertheless, on the global stage the superhero movie is on track to become one of the biggest films since the pandemic hit. AMC, the world’s largest cinema operator and owner of Odeon, said that in the US it had generated the second-busiest ticket sales day ever, after Avengers: Endgame.\u003c/p\u003e \u003cp\u003eUS analysts estimate that its opening weekend is likely to gross at least $150m at the North American box office, which if it does will make it the first film since pre-pandemic 2019 to do so.\u003c/p\u003e \u003cp\u003eTo date, the top two highest grossing films of the year are both Chinese – The Battle at Lake Changjin ($896m) and Hi, Mom ($822m) – with the third and fourth spots taken by No Time To Die ($763m) and F9: The Fast Saga ($726m).\u003c/p\u003e\"\n  },\n  \"isHosted\": false,\n  \"pillarId\": \"pillar/arts\",\n  \"pillarName\": \"Arts\"\n}%\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismr%2Fquick-json-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluismr%2Fquick-json-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismr%2Fquick-json-server/lists"}