![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 4 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.