{"id":16024494,"url":"https://github.com/stephenlb/pubnub-sqlite-server","last_synced_at":"2026-04-26T12:32:05.816Z","repository":{"id":252124265,"uuid":"839494733","full_name":"stephenlb/pubnub-sqlite-server","owner":"stephenlb","description":"How to Use localhost as Web Database Server. The PubNub SQLite Query Server contains a Node.js server application that uses PubNub to listen for SQL queries on a specified channel and executes them on an in-memory SQLite database. The results are then sent back to a designated response channel.","archived":false,"fork":false,"pushed_at":"2024-08-09T22:49:28.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T04:19:25.314Z","etag":null,"topics":["nodejs","server","sql","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"https://stephenlb.github.io/pubnub-sqlite-server","language":"HTML","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/stephenlb.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":"2024-08-07T18:13:37.000Z","updated_at":"2024-08-09T22:49:31.000Z","dependencies_parsed_at":"2024-12-18T09:23:30.956Z","dependency_job_id":"898c1aa9-e870-4c11-a55e-3eb1be26ad2c","html_url":"https://github.com/stephenlb/pubnub-sqlite-server","commit_stats":null,"previous_names":["stephenlb/pubnub-sqlite-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stephenlb/pubnub-sqlite-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fpubnub-sqlite-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fpubnub-sqlite-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fpubnub-sqlite-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fpubnub-sqlite-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenlb","download_url":"https://codeload.github.com/stephenlb/pubnub-sqlite-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fpubnub-sqlite-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32297893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"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":["nodejs","server","sql","sqlite","sqlite3"],"created_at":"2024-10-08T19:21:18.248Z","updated_at":"2026-04-26T12:32:05.800Z","avatar_url":"https://github.com/stephenlb.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to Use localhost as Web Database Server\n\nThis repository contains a Node.js server application that uses PubNub to listen for SQL queries on a specified channel and executes them on an in-memory SQLite database. The results are then sent back to a designated response channel.\n\nHere's a walkthrough of the code and how it works on YouTube:\n\n[![How to Use localhost as Web Database Server](https://img.youtube.com/vi/xj51kgNFhgY/hqdefault.jpg)](https://www.youtube.com/watch?v=xj51kgNFhgY)\n\n## Features\n\n- Real-time communication with PubNub.\n- In-memory SQLite database for executing SQL queries.\n- Simple web-based interface for sending SQL queries and viewing results.\n\n## Requirements\n\n- Node.js (v14 or later)\n- PubNub account and API keys\n\n## Setup\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/pubnub-sqlite-server.git\ncd pubnub-sqlite-server\n```\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 3. Configure Environment Variables\n\nCreate a `.env` file at the root of the project and add your PubNub keys:\n\n\u003e [Get API Keys](https://admin.pubnub.com/)\n\n```plaintext\nPUBNUB_PUBLISH_KEY=your-publish-key\nPUBNUB_SUBSCRIBE_KEY=your-subscribe-key\n```\n\n### 4. Run the Server\n\n```bash\nnpm start\n```\n\nThe Node.js server will start and listen for SQL queries on the `query` channel.\n\n## Web Interface\n\n### 1. Configure PubNub Keys\n\nIn the `index.html` file, replace the placeholders with your actual PubNub keys:\n\n\u003e [Get API Keys](https://admin.pubnub.com/)\n\n```javascript\nconst pubnub = new PubNub({\n    publishKey: 'your-publish-key',  // Replace with your actual PubNub publish key\n    subscribeKey: 'your-subscribe-key'  // Replace with your actual PubNub subscribe key\n});\n```\n\n### 2. Open `index.html`\n\nNavigate to the `client` directory and open the `index.html` file in your web browser. You can use this simple interface to send SQL queries to the server.\n\n\n### 3. Use the Interface\n\n- Enter an SQL query in the textarea (e.g., `SELECT * FROM test`).\n- Click the \"Send Query\" button.\n- View the result of the query in the response area below the button.\n\n## Example Usage\n\n### Sample SQL Query\n\n```sql\nSELECT * FROM test\n```\n\nThis will return all rows from the `test` table that has been pre-populated with sample data in the in-memory SQLite database.\n\n## File Structure\n\n```plaintext\n.\n├── index.html            # Web interface for interacting with the server\n├── .env                  # Environment variables for PubNub keys\n├── package.json          # Project metadata and dependencies\n├── server.js             # Main server code for handling PubNub messages and SQLite queries\n└── README.md             # Project documentation\n```\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fpubnub-sqlite-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenlb%2Fpubnub-sqlite-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fpubnub-sqlite-server/lists"}