Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
tool-db-cli
Advanced tools
DISCLAIMER: WORK IN PROGRESS/NOT PRODUCTION-READY
tool-db
runs a tool-db server from your command line
npm i -g tool-db-cli
Start local tool-db server:
tool-db serve watch=foobar
Connect and put data from another local server:
tool-db put --peers=0.0.0.0:8000 foobar myvalue
Start local tool-db server with --repl
tool-db serve --repl
Output
ToolDB node running at http://127.0.0.1:8080
Storage: tooldb
>
You can access access tooldb
instance directly from repl
> await tooldb.anonSignIn();
> await tooldb.putData("key", "value")
start a small mesh network of tool-db servers, each listening on a different IP and saving data in a different folder.
tool-db --host=8081 --peers=127.0.0.1:8083,127.0.0.1:8084 --storageName=data1 # 1
tool-db --host=8082 --peers=127.0.0.1:8083,127.0.0.1:8084 --storageName=data2 # 2
tool-db --host=8083 --peers=127.0.0.1:8081,127.0.0.1:8082 --storageName=data3 # 3
tool-db --host=8084 --peers=127.0.0.1:8081,127.0.0.1:8082 --storageName=data4 # 4
On client side
<script src="https://unpkg.com/tool-db/bundle.js">
<script>
const { ToolDb } = tooldb;
const tdb = new ToolDb({ peers: [{ host: "localhost", port: 8080 }], debug: true });
</script>
now play around with shutting down individual peers and bringing them back online
As long as there is a path through the mesh network, the heartbeats will propagate from B to A.
But if peers 1 and 2 (or peers 3 and 4) simultainiously go down, A and B are seperated and updates won't go through. However, ToolDB peers will try to reestablish the connection to a lost peer, so as soon as you bring one of the peers back online, they will reconnect and updates will go through again.
tool-db serve
start tool-db server on http
Options:
--version Show version number [boolean]
--help Show help [boolean]
--db database name to use [string]
--storageName our storage namespace [string] [default: "tooldb"]
--peers comma-seperated list of URLs and IPs [string]
--watch comma-separated list of keys to watch [string]
--host set ip to listen on [string] [default: "127.0.0.1"]
--port set port to listen on [number] [default: 8080]
--repl go into a repl (with tooldb instace) [boolean]
--debug enable debug mode [boolean] [default: false]
FAQs
run tooldb command from commandline
The npm package tool-db-cli receives a total of 5 weekly downloads. As such, tool-db-cli popularity was classified as not popular.
We found that tool-db-cli 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.