{"id":15066534,"url":"https://github.com/selfup/rejs","last_synced_at":"2025-04-10T13:43:15.603Z","repository":{"id":42787582,"uuid":"55826158","full_name":"selfup/rejs","owner":"selfup","description":"File based database for IoT! Built for developer freedom. ","archived":false,"fork":false,"pushed_at":"2023-01-10T17:32:37.000Z","size":321,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T02:41:22.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/selfup-rejs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selfup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-09T04:35:29.000Z","updated_at":"2023-01-07T20:24:12.000Z","dependencies_parsed_at":"2023-02-08T19:45:28.179Z","dependency_job_id":null,"html_url":"https://github.com/selfup/rejs","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/selfup%2Frejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Frejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Frejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Frejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfup","download_url":"https://codeload.github.com/selfup/rejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248226311,"owners_count":21068179,"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-09-25T01:09:02.495Z","updated_at":"2025-04-10T13:43:15.587Z","avatar_url":"https://github.com/selfup.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selfup - Rejs\n\n### File based database! Built for developer freedom. Geared for NodeBots/IoT\n\n#### Event Based Key Value Store:\n\nMade to store hardware data on the filesystem!\n\n**Installation:**\n\n`npm install selfup-rejs --save`\n\n**Warning**\n\nThis was built with node v14.4.0\n\n**Ensure your data is safe and not in version control:**\n\n`echo 'selfup-rejs/*' \u003e\u003e .gitignore`\n\n**Load package:**\n\n```js\nconst Rejs = require('selfup-rejs');\nconst rejs = new Rejs();\n```\n\n**Official DOCS:**\n\nDocumentation: [right here!](https://github.com/selfup/rejs/blob/master/DOCS.md)\n\n### Example Use Case Repos:\n\n**Raspberry Pi**\n\n`NodeBots/JohnnyFive` and logging event data: [Repo](https://github.com/selfup/rpi-rejs)\n\n**Arduino**\n\n`NodeBots/JohnnyFive` and logging event data: [Repo](https://github.com/selfup/arduino-rejs)\n\n### Video on how to use selfup-rejs:\n\n[Link to Youtube Vid](https://www.youtube.com/watch?v=dVTePMkw9EE\u0026feature=youtu.be\u0026a)\n\n### How to Use:\n\nUsing RESTful verbs to help explain from a high level what is happening.\n\nThis is not a server.\n\nThis is a database that writes and reads files on the server.\n\n**Verbs/Methods**\n\n- (POST) Create a table: `rejs.createTable('tablename')`\n- (POST) Create Multiple Tables: `rejs.createTables('one', 'two', 'three')`\n- (POST) Add data to table: `rejs.newData('tablename', dataObject)`\n- **(POST) Add data to Multiple Tables:**\n\n```js\nrejs.newDatas(\n  ['firstTable', { test: 'data' }],\n  ['secondTable', { test: 'data' }],\n  ['thirdTable', { test: 'data' }],\n);\n```\n\n- (DELETE) Delete data by ID in a table: `rejs.deleteById('tablename', '2')`\n- (DELETE) Drop a table: `rejs.dropTable('tablename')`\n- (DELETE) Multi-Table Drop: `rejs.dropTables('firstTable', 'secondTable')`\n- (PUT) Replace/Overwrite a table: `rejs.updateTable('tablename', dataObject)`\n- **(PUT) Replace/Overwrite Multiple tables:**\n\n```js\nrejs.updateTables(\n  ['firstTable', { test: 'new data' }],\n  ['secondTable', { test: 'new data' }],\n  ['thirdTable', { test: 'new data' }],\n);\n```\n\n- (GET) Table Object Query: `rejs.getTable('tablename')`\n- (GET) Multi-Table Query: `rejs.getTables('table', 'table2', 'table3')`\n- (GET) Find by ID: `rejs.findId('tablename', 'id')`\n- (GET) Where/Select: `rejs.where('tablename', 'any value in a flat object')`\n\n### Potential use Cases:\n\n#### JohnnyFive/NodeBots/IoT\n\n- Store temperature data over time\n- Store how many times a door has been opened\n- Store telemetry data\n- Store Data on a Raspberry Pi\n- Store Data on a server hooked up to an Arduino\n- Store Data on an Arduino Yun/BeagleBone/etc...\n- Many possibilities for IoT\n\n#### Electron OSX/Windows Apps\n\n- Store file paths to load files needed on load\n- Store small notes for a twitter like notes app\n- Store image url's\n- Store any data that you need to persist from app shutdown back to open\n\n#### VPS\n\n- Use it as a small DB for a low volume production app\n- Use it to get quickly set up, and then move on to Mongo/Postgres once your app is mature and MVP is proven\n\n### Test Coverage\n\n#### To get 100% coverage:\n\nIf the `selfup-rejs` folder is in your directory:\n\n```sh\nnpm install\nrm -rf selfup-rejs\n```\n\nThen you can run:\n\n`./node_modules/.bin/istanbul cover _mocha`\n\nNow the selfup-rejs folder will be in your directory again!\n\n#### To run tests without coverage:\n\n`npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Frejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfup%2Frejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Frejs/lists"}