Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
The package takes json
or plain object
and turns it into a RESTful API server running on a given port (defaults to 8000
).
$ npm install apit
# OR
$ yarn add apit
Or to use as CLI:
$ npm -g install apit
# OR
$ yarn global add apit
const apit = require('apit')
const data = {
posts: {
foo: {
message: 'hello'
}
},
other: 'foo',
baz: [1,2,3],
food: {
steal: {
healthy: true
}
}
}
apit(data)
{"pid":54578,"hostname":"Tiaan-FF-Mac.local","name":"brewski","level":30,"time":1501775589826,"msg":"Server listening at http://localhost:3000","v":1}
The above example will create the following routes with associated values:
If you install the module globally, you can also use it with a json
file or module that exports a object
:
apit --file=example.json
# {"pid":56017,"hostname":"Tiaan-FF-Mac.local","name":"brewski","level":30,"time":1501776268494,"msg":"Server listening at http://localhost:8000","v":1}
Contributions are welcome!
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Or open up a issue.
Licensed under the MIT License.
FAQs
JSON/Object to REST API with zero effort
The npm package apit receives a total of 2 weekly downloads. As such, apit popularity was classified as not popular.
We found that apit 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.