{"id":28222828,"url":"https://github.com/warlock/nodejs-api-rest-tester","last_synced_at":"2026-05-03T07:32:40.550Z","repository":{"id":13799085,"uuid":"74983906","full_name":"warlock/nodejs-api-rest-tester","owner":"warlock","description":"RxApi : Fast dummy API RESTFULL \u0026 WEBSOCKETS","archived":false,"fork":false,"pushed_at":"2022-01-13T15:15:59.000Z","size":81,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-11T02:51:44.371Z","etag":null,"topics":["api","database","http","rest","restfull","socketio","websockets"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rxapi","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/warlock.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":"2016-11-28T15:00:19.000Z","updated_at":"2017-06-14T12:22:19.000Z","dependencies_parsed_at":"2022-08-07T07:15:43.860Z","dependency_job_id":null,"html_url":"https://github.com/warlock/nodejs-api-rest-tester","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/warlock/nodejs-api-rest-tester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warlock%2Fnodejs-api-rest-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warlock%2Fnodejs-api-rest-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warlock%2Fnodejs-api-rest-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warlock%2Fnodejs-api-rest-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warlock","download_url":"https://codeload.github.com/warlock/nodejs-api-rest-tester/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warlock%2Fnodejs-api-rest-tester/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32562118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["api","database","http","rest","restfull","socketio","websockets"],"created_at":"2025-05-18T07:14:07.118Z","updated_at":"2026-05-03T07:32:40.538Z","avatar_url":"https://github.com/warlock.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RxApi DUMMY VERSION\n\u003eRun the minimal API HTTP RESTFULL and WEBSOCKETS in memory database for make a fast dummy testing.\n\u003e\n\u003ehttps://rxapi.js.gl\n\n### Install rxAPI from npm\n```sh\nsudo npm i rxapi -g\n```\n\n\n### Create a dummy project\n```sh\nrxapi dummy project\n```\n\n### Create a server project\n```sh\nrxapi new project\n```\n\n\n## DOCUMENTATION FOR RXAPI DUMMY IN MEMORY:\n\n[http://rxapi.js.gl](http://rxapi.js.gl)\n\n### Generate models schema in 'schema.json'\n```json\n{\n  \"users\": {\n    \"username\" : \"string\",\n    \"surname\" : \"string\",\n    \"password\" : \"string\"\n  },\n  \"articles\": {\n    \"title\" : \"string\",\n    \"creation\" : \"date\",\n    \"tags\" : \"string\",\n    \"content\" : \"text\",\n    \"author\" : \"string\"\n  }\n}\n\n```\n\n### Generate HTTP RESTFULL scaffold in 'scaffold/http.js':\n```js\nmodule.exports = api =\u003e {\n\n  api.gen('articles')\n\n}\n```\n\n### Generate SOCKET.IO scaffold in 'scaffold/socket.js':\n```js\nmodule.exports = api =\u003e {\n\n  api.gen('articles' (socket, db) =\u003e {\n    console.log('SOCKET Articles listening...')\n  })\n\n}\n```\n\n### Run\n```sh\nnpm start\n```\n\n### HTTP API RESTFULL Routes\nArticles demo:\n\n| HTTP Route             | Verb     | Description                    |\n| ---------------------- |:--------:| ------------------------------:|\n| /articles              |  GET     | Get all articles               |\n| /articles              |  POST    | Create a article               |\n| /articles/:article_id  |  GET     | Get a single article           |\n| /articles/:article_id  |  PUT     | Update a article with new info |\n| /articles/:article_id  |  DELETE  | Delete article                 |\n\n\n### SOCKET.IO SCAFFOLD\nArticles demo:\n\n| Emit and events   | Description                    |\n| ----------------- | ------------------------------:|\n| articlesGetAll    | Get all articles               |\n| articlesAdd       | Create a article               |\n| articlesGet       | Get a single article           |\n| articlesUpdate    | Update a article with new info |\n| articlesDelete    | Delete article                 |\n\n### Add fast features in HTTP with callback:\n```js\napi.gen('users', (http, db) =\u003e {\n  db.loadDatabase(err =\u003e {\n    if (err) throw Error(`DB USER: Have a problem loading db ${err}`)\n    else {\n      db.insert({\n        \"username\" : \"user\",\n        \"name\" : \"user_name\",\n        \"surname\" : \"user_surname\",\n        \"password\" : \"password\"\n      },\n      (err, newDoc) =\u003e {\n        if (err) throw Error(`DB USER: Have a problem inserting in db ${err}!`);\n        else console.log(`DB USER: Default user created!`);\n      })\n    }\n  })\n})\n```\n\n### Add fast features in SOCKET with callback:\n```js\napi.gen('articles', (socket, db) =\u003e {\n  db.find({ _id : FX8REOZyumD022XE }, (err, docs) =\u003e {\n    if (err) console.error(`Error... ${err}`)\n    else console.log(`Results: ${JSON.stringify(docs)}`)\n  })\n})\n```\n\n\n### Dependencies thanks\n- Express.js [http://expressjs.com/](http://expressjs.com)\n- Socket.io [http://socket.io](http://socket.io)\n- Body-parser [https://github.com/expressjs/body-parser](https://github.com/expressjs/body-parser)\n- NeDB [https://github.com/louischatriot/nedb](https://github.com/louischatriot/nedb)\n\n\n### License\n\nThe MIT License (MIT) Copyright (c) 2016 Josep Subils Rigau (josep@js.gl)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarlock%2Fnodejs-api-rest-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarlock%2Fnodejs-api-rest-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarlock%2Fnodejs-api-rest-tester/lists"}