1.0.6 • Published 5 years ago
smalldb-server v1.0.6
SmallDB-Server
This library is the official client for SmallDB. Under the hood is "lowdb" used, every praise belongs to him.
The database is working as a queue in another way.
You will get 5 last points and 5 last points from day before. If some data was collected and couldn't be send, you can gurantee that old and new data will be sent when requesting the database.
New points will be saved at newest database.
The library is intended to be small and run on low-memory devices.
Server
JavaScript
const HTTPServer = require('smalldb-server').default.HTTP.Server;
const SocketServer = require('smalldb-server').default.Socket.Server;
const httpserver = new HTTPServer( [host = 'localhost'] , [port = 3000] );
.....
httpserver.run();
TypeScript
import DBServer from 'smalldb-server';
const httpserver : DBServer = new DBServer( [host = 'localhost'] , [port = 3000] );
................
httpserver.run();