Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
easy-db-server
Advanced tools
Lite&easy database REST server based on easy-db-node
without any necessary configuration.
Include types for TypeScript.
$ npx easy-db-server
Usage: easy-db-server --port <port> -html ./index.html
Options:
--help Show help [boolean]
--version Show version number [boolean]
-p, --port PORT [number]
-h, --html Index HTML file [string]
-t, --easy-db-token Security token [string]
-v, --verbose 0 - no, 1 - yes [number] [default: 1]
-c, --cors Use CORS [boolean] [default: true]
-s, --size Request size limit [string] [default: "15MB"]
Usage with easy-db-node
.
import { express, useEasyDB } from "easy-db-server";
// or
const { express, useEasyDB } = require("easy-db-server");
const PORT = 80;
const app = express();
useEasyDB(app, {
verbose: 1,
requestSizeLimit: "15MB",
cors: true,
token: "tokenHash",
});
app.listen(PORT, () =>
console.log(`Easy DB server is running at http://localhost:${PORT}.`)
);
import { express, useEasyDB } from "easy-db-server";
import easyDBGoogleCloud from "easy-db-google-cloud";
const easyDB = easyDBGoogleCloud({ ... });
const app = express();
useEasyDB(app, {}, easyDB);
app.listen(80);
GET /api/:collection
: return whole collection optionally with query
, projection
, sort
, skip
and limit
GET /api/:collection/:id
: return one row from collection by idPOST /api/:collection
: create row with random id string
and return idPUT /api/:collection/:id
: replace row from collection by idPATCH /api/:collection/:id
: update row (shallow merge) from collection by idDELETE /api/:collection/:id
: remove whole row from collection by idGET /api/easy-db-collections
: return names of collectionsUse header Easy-DB-Token
for your token.
Just sent to POST or PUT anywhere in the body { "type": "EASY_DB_FILE", "url": "data:image/png;base64,iVB...YI=" }
.
With GET you will receive { "type": "EASY_DB_FILE", "url": "/easy-db-files/j9pSCplbMx7U.png" }
Easy-db-server use mingo library that allow you to use MongoDB like query, projection, sort, skip and limit. For documentation on using query and projection operators see MongoDB.
GET http://localhost:80/api/user?query={"age":{"$gt":18}}&projection={"name":1,"age":1}&sort={"name":1,"age":-1}&skip=20&limit=10
Only open file and edit them.
collection1.json
{
"LnldbDWRXe8r": { "myRow": 1, "update": 1 },
"UXnuhpl5RvVp": { "myRow": 2, "update": 36 }
}
FAQs
Lite&easy database for Node.js.
The npm package easy-db-server receives a total of 43 weekly downloads. As such, easy-db-server popularity was classified as not popular.
We found that easy-db-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.