
Security News
minimatch Patches 3 High-Severity ReDoS Vulnerabilities
minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.
Generic fully RESTful CRUD API for quickly saving and fetching data objects. JSON-API Compliant. Mongo integrated. Node-cache for cache. Express and express-ws. Ideal for quick, simple, seemless saving and fetching.
The purpose of sto is to create a generalized API that can seemlessly log and return JSON data objects. Whether you want somewhere to store and retreive the state of your Javascript app, the data of your IoT device, or the user status of your mobile game, sto provides you with an easy to setup solution.
Basically if you don't want to build a custom database integration or set up a server+API yourself, and your use case is tremendously simple, or if you are limited from direct database interaction by architectural or network security constraints, just set up sto and go.
npm install -g sto
sto setup
Note: sto setup will build a config.json file which you can edit directly.
More details on what you can do with it are provided in example.config.json in this repo.
To run
sto
(NOTE: logs will still be populated in the ./logs/ directory for warnings and errors. In future versions this will be adjustable in the config.)
Make HTTP requests to the following paths. For a more detailed implementation, check out test.js.
Insert data
POST
body: {collection: [collection], owner: [owner], data: [JSON-data-content]}
http(s)://[your-server-here]/v1/insert
returns a hash + id
Update data
PUT
body: {collection: [collection], id: [id], data: [JSON-data-content]}
http(s)://[your-server-here]/v1/update
returns a hash + id
Fetch by id
GET
http(s)://[your-server-here]/v1/[collection]/id/[id]
Fetch last input
GET
http(s)://[your-server-here]/v1/[collection]/last/[owner]
Fetch last 5 inputs
GET
http(s)://[your-server-here]/v1/[collection]/last/[owner]/5
Fetch page 2 of inputs split by 5 (newest first)
GET
http(s)://[your-server-here]/v1/[collection]/last/[owner]/5/page/1
# 0 indexed pages
Fetch first 5 inputs
GET
http(s)://[your-server-here]/v1/[collection]/first/[owner]/5
Fetch page 2 of inputs split by 5 (oldest first)
GET
http(s)://[your-server-here]/v1/[collection]/first/[owner]/5/page/1
# 0 indexed pages
Fetch by hash (unique to data)
GET
http(s)://[your-server-here]/v1/[collection]/hash/[hash]
Get a total count of data objects stored for a collection/owner
GET
http(s)://[your-server-here]/v1/[collection]/count/[owner]
#owner is optional
Delete by id
DELETE
body: { collection: [collection], id: [id] }
http(s)://[your-server-here]/v1/delete
Delete by hash (with owner-specific option)
DELETE
body: { collection: [collection], hashData: [hash], owner: [owner] }
http(s)://[your-server-here]/v1/delete
Delete all documents by owner (with skip last n inserts option)
DELETE
body: { collection: [collection], owner: [owner-here], skip: [n] }
http(s)://[your-server-here]/v1/delete
#including a skip value will preserver the last n inserts for specified owner
(NOTE: Collection specifications are always optional in these requests. If you do not include a collection, the default will be read from the config file.)
Write more docs
Write more tests
Integrations
Build more standardized clients+wrappers
Wrappers
Key Feature Priorities
Planned Integrations
[MIT]
Copyright 2017 z3dtech
If you take my code and modify it without giving me credit, I will hunt you down, read through your code, adopt changes I like, and thank you for your efforts. You've been warned.
FAQs
Simplest possible RESTFUL storage API
We found that sto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.

Research
/Security News
Socket uncovered 26 malicious npm packages tied to North Korea's Contagious Interview campaign, retrieving a live 9-module infostealer and RAT from the adversary's C2.

Research
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.