Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Creates a REST API server from given JavaScript/JSON objects. Uses Koa for the REST API. Extendable with custom routes and middleware.
Install the package in your project directory:
npm install js-api
Start js-api server with some data:
var jsapi = require('js-api');
var data = {posts: [{id: 'p1', title: 'first post', body: 'lorem ipsum'}]};
jsapi.start(data, 3000);
Now browse to http://localhost:3000/posts and you will see the posts in JSON format.
See example.js for a complete example with custom middleware and custom route definitions for resources.
You can download the entire repo and start the example directly with:
npm install
npm start
And browse to http://localhost:3000/posts to see the contents of the example.
MIT
FAQs
JavaScript/JSON objects to REST API in seconds.
The npm package js-api receives a total of 8 weekly downloads. As such, js-api popularity was classified as not popular.
We found that js-api 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.