{"id":26467452,"url":"https://github.com/rmuskovets/restjs","last_synced_at":"2026-04-15T14:33:50.500Z","repository":{"id":143904490,"uuid":"216154220","full_name":"RMuskovets/restjs","owner":"RMuskovets","description":"REST APIs for Node.js! Powered by Express.","archived":false,"fork":false,"pushed_at":"2022-12-11T09:59:16.000Z","size":23,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T21:41:15.755Z","etag":null,"topics":["api","express","javascript","nodejs","rest-api"],"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/RMuskovets.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,"zenodo":null}},"created_at":"2019-10-19T05:28:49.000Z","updated_at":"2019-10-19T09:36:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"573878e2-7c10-4a1c-b3a8-08acb4ad1772","html_url":"https://github.com/RMuskovets/restjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RMuskovets/restjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMuskovets%2Frestjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMuskovets%2Frestjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMuskovets%2Frestjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMuskovets%2Frestjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RMuskovets","download_url":"https://codeload.github.com/RMuskovets/restjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMuskovets%2Frestjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264567046,"owners_count":23629301,"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":["api","express","javascript","nodejs","rest-api"],"created_at":"2025-03-19T14:44:23.060Z","updated_at":"2026-04-15T14:33:50.451Z","avatar_url":"https://github.com/RMuskovets.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rapijs\nThis library is just a wrapper on Express. It helps you making REST APIs.  \n## Okay, how do I use it?\nOh, that's pretty simple.\nI'll include some code from `examples/01.js`.  \n```js\n\nconst express = require('express');\nconst rapijs  = require('rapijs');\nconst app     = express();\n\nlet myResource = rapijs.Resource({\n\tread: { customUrlParams: [], cb: (req, res) =\u003e {\n\t\tres.send({\n\t\t\tgreeting: \"Hi!\"\n\t\t});\n\t}},\n\tcreate: { customUrlParams: [], cb: () =\u003e {}}\n\tupdate: { customUrlParams: [], cb: () =\u003e {}}\n\tdel   : { customUrlParams: [], cb: () =\u003e {}}\n});\n\napp.use(express.json());\napp.use(express.urlencoded({ extended: true }));\n\napp.use('/', myResource);\n\napp.listen(8080);\n\n```\n### What does this code do?\n1. It loads the `express` and `rapijs` modules.\n2. It creates an instance of Express app.\n3. It creates a `rapijs` resource:  \nRead: no custom URL parameters, callback sends greeting.  \nCreate: no custom URL parameters, callback does nothing.  \nUpdate: no custom URL parameters, callback does nothing.  \nDelete: no custom URL parameters, callback does nothing.  \n4. The app uses the JSON `middleware` provided by Express.\n5. The app uses the URL encoding `middleware` too.\n6. The app sets the resource to be on `/` path.\n7. The app listens on `localhost:8080`.\n\n## What is a Resource?\nA resource is an object we're passing to Resource function to create a router.  \nBasically, it has four methods (callbacks) to belong to CRUD:\n+ Create\n+ Read\n+ Update\n+ Delete\n\n## How to collaborate?\nFind me on [GitHub](https://github.com/RMuskovets/restjs)!  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmuskovets%2Frestjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmuskovets%2Frestjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmuskovets%2Frestjs/lists"}