{"id":17349281,"url":"https://github.com/co2-git/db.io","last_synced_at":"2025-07-20T06:33:34.053Z","repository":{"id":30111072,"uuid":"33660889","full_name":"co2-git/db.io","owner":"co2-git","description":"Socket RAM On-Demand Event-Driven DataBase in NodeJS","archived":false,"fork":false,"pushed_at":"2015-04-09T09:38:07.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T11:44:48.194Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/co2-git.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":"2015-04-09T09:39:05.000Z","updated_at":"2017-07-07T20:53:43.000Z","dependencies_parsed_at":"2022-08-26T09:52:11.477Z","dependency_job_id":null,"html_url":"https://github.com/co2-git/db.io","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/co2-git/db.io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fdb.io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fdb.io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fdb.io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fdb.io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/co2-git","download_url":"https://codeload.github.com/co2-git/db.io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fdb.io/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266076372,"owners_count":23872746,"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-10-15T16:55:15.905Z","updated_at":"2025-07-20T06:33:34.032Z","avatar_url":"https://github.com/co2-git.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"db.io `alpha`\n============\n\n# Minimalistic database service\n\n`db.io` is a server/client database written in JavaScript with the following features:\n\n- Memory database (data is stored in RAM)\n- TCP socket server (fast socket connexion)\n- Event-driven (all clients get notified in real time of any watched events)\n\n# About\n\n`db.io` is the on-the-go solution to create a database server. The database server uses TCP sockets and data is stored in the RAM as JSON. A client is provided to execute CRUD queries. The database server is emitting events so a client get be used as a listener.\n\n# Usage\n\n```bash\nnpm install db.io\n```\n\n```js\nvar dbio = require('db.io');\n\nvar players = dbio.client('players');\n\n// Get all players\n\nplayers\n  .toArray()\n  .then(function (players) {});\n\n// Insert player\n\nplayers\n  .push({ 'name': 'Toni' })\n  .then(function (players) {});\n\n// Get last player which name is Toni\n\nplayers\n  .toArray()\n  .limit(1)\n  .reverse()\n  .filter(function (player) {\n    return player.name === 'Toni';\n  )\n  .then(function (players) {});;\n  \n// Update player\n\nplayers\n  .limit(1)\n  .reverse()\n  .filter(function (player) {\n    return player.name === 'Toni';\n  )\n  .map(function (player) {\n    player.score += 100;\n    \n    return player;\n  })\n  .then(function (players) {});\n\n// Remove Toni if his score is below 1000\n\nplayers\n  .limit(1)\n  .reverse()\n  .filter(function (player) {\n    return player.name === 'Toni' \u0026\u0026 score \u003c 100;\n  )\n  .remove()\n  .then(function (players) {});\n```\n# Command Line\n\nWe ship with a command line utility:\n\n```bash\nnpm install -g db.io\n\n$ dbio push players '{\"test\":\"foo\"}'\n  server: dbio://localhost:7000\n  message: players pushed\n  data:\n    0: {\"test\":\"foo\"}\n\n$ dbio toArray players limit=10\n  server: dbio://localhost:7000\n  message: players toArray\n  length: 1\n  data:\n    0: {\"test\":\"foo\"}\n\n$ dbio pull players 0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco2-git%2Fdb.io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fco2-git%2Fdb.io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco2-git%2Fdb.io/lists"}