https://github.com/allnulled/sqlite-data-system
Auth and Rest data with sqlite for node.js and browser through the same API.
https://github.com/allnulled/sqlite-data-system
Last synced: about 1 year ago
JSON representation
Auth and Rest data with sqlite for node.js and browser through the same API.
- Host: GitHub
- URL: https://github.com/allnulled/sqlite-data-system
- Owner: allnulled
- Created: 2024-12-18T23:27:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T23:23:02.000Z (over 1 year ago)
- Last Synced: 2025-03-30T05:32:57.492Z (about 1 year ago)
- Language: JavaScript
- Size: 350 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sqlite-data-system
Auth and Rest data system with sqlite for node.js and browser through the same API.
## Installation
### In node.js
```sh
npm i -s @allnulled/sqlite-data-system
```
Then in javascript:
```js
const SqliteDataSystem = require("@allnulled/sqlite-data-system");
const datasys = SqliteDataSystem.create();
```
### In browser
```html
```
Then in javascript:
```js
const datasys = window.SqliteDataSystem.create();
```
Also, move **both files** `test/browser/sql-wasm.js` and `test/browser/sql-wasm.wasm`, one beside the other, to the same directory of the `*.html` you are using them in, so you can load the sqlite for the browser library, which works with `*.wasm` file.
## Usage
See the [tests](./test) with mocha to get the idea of the API.
## Use cases
- Database-oriented applications
- Targeting browser and node.js
- Based on SQLite
- Requiring a REST system (because the Auth system in the front is like a bit senseless)