Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
jsonapi-server
Advanced tools
A fully featured NodeJS sever implementation of json:api. You provide the resources, we provide the api.
jsonapi-server
is a fully featured NodeJS server implementation of json:api
. You provide the resources, we provide the api.
You can have a complete json:api server providing a photos
resource with just this:
var jsonApi = require("jsonapi-server");
jsonApi.setConfig({
base: "rest",
port: 16006,
});
jsonApi.define({
resource: "photos",
handlers: jsonApi.mockHandlers,
attributes: {
title: jsonApi.Joi.string()
url: jsonApi.Joi.string().uri()
height: jsonApi.Joi.number().min(1).max(10000).precision(0)
width: jsonApi.Joi.number().min(1).max(10000).precision(0)
}
});
jsonApi.start();
Your new API will be alive at http://localhost:16006/rest/
and your photos
resources will be at http://localhost:16006/rest/photos
.
Fire up an example json:api
server using the resources mentioned in the official spec via:
git clone https://github.com/holidayextras/jsonapi-server.git
npm install
npm start
then browse to
http://localhost:16006/rest/photos
the example implementation can be found here
FAQs
A config driven NodeJS framework implementing json:api
The npm package jsonapi-server receives a total of 630 weekly downloads. As such, jsonapi-server popularity was classified as not popular.
We found that jsonapi-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.