1.0.27-beta • Published 2 days ago
flamingodb v1.0.27-beta
FlamingoDB
!IMPORTANT Viewing alpha v1 documentation – usable but expect breaking changes. For stable version, see here
Install
npm install flamingodb
Usage
Create a databases/db.json
or databases/db.json5
file
{
"__collections__":[],
"__documents__":[],
"__datas__":[]
}
You can read more about JSON5 format here.
Setup application
const flamingo = require('flamingodb');
const server = flamingo.server;
//run a local server
server.start_server('localhost', 3000, async (serve, host, port) => {
webserver = serve;
webserver.use(express.static(path.join(__dirname, 'views')));
console.log(`Server it\'s started and listen, http://${host}:${port}`);
});
//start a public server
exec('curl ip-adresim.app', function(error, stdout, stderr){
if(error){
console.log("public server not started");
return;
}
server.start_server(`${stdout}`, 6661, async (serve, host, port) => {});
});
Routes
API calls are made automatically according to the following patterns:
GET /:collection
GET /:collection/:document
POST /:collection
PUT /:collection/:document
PATCH /:collection/:document
DELETE /:collection/:document
# Same for comments
Delete
DELETE /:collection/:document
DELETE /:collection/:document?args=values
1.0.25-beta
2 days ago
1.0.23-beta
2 days ago
1.0.22-beta
2 days ago
1.0.26-beta
2 days ago
1.0.21-beta
2 days ago
1.0.27-beta
2 days ago
1.0.19-beta
7 days ago
1.0.20-beta
6 days ago
1.0.16-beta
15 days ago
1.0.17-beta
15 days ago
1.0.18-beta
15 days ago
1.0.15-beta
16 days ago
1.0.11-beta
22 days ago
1.0.12-beta
22 days ago
1.0.8-beta
22 days ago
1.0.14-beta
21 days ago
1.0.10-beta
22 days ago
1.0.13-beta
21 days ago
1.0.9-beta
22 days ago
1.0.7-beta
27 days ago
1.0.6-beta
28 days ago
1.0.2-beta
1 month ago
1.0.0-beta
1 month ago
1.0.5-beta
1 month ago
1.0.3-beta
1 month ago
1.0.4-beta
1 month ago
1.0.4
1 month ago
1.0.1-beta
1 month ago
1.0.3
1 month ago
1.0.2
1 month ago
1.0.0
1 month ago