![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@coding-blocks/jsonapi-server-integerid
Advanced tools
A config driven NodeJS framework implementing json:api
jsonapi-server
NOTE: This is a fork of holidayextra's jsonapi-server The difference being our fork uses integer autoincrement ids instead of UUIDs. Apart from that, it is exactly the same implementation
You'd want to use our version of jsonapi-store-[*] plugins with this as the original versions will not be compatible with this
The rest of the readme is verbatim copy of the original project
A config driven NodeJS framework implementing json:api
and GraphQL
. You define the resources, it provides the api.
This framework solves the challenges of json:api and GraphQL without coupling us to any one ORM solution. Every other module out there is either tightly coupled to a database implementation, tracking an old version of the json:api spec, or is merely a helper library for a small feature. If you're building an API and your use case only involves reading and writing to a data store... well count yourself lucky. For everyone else, this framework provides the flexibility to provide a complex API without being confined to any one technology.
A config driven approach to building an API enables:
Ultimately, the only things you as a user of this framework need to care about are:
handler
for:
create
ing a resourcedelete
ing a resourcesearch
ing for many resourcesfind
ing a specific resourceupdate
ing a specific resourceWe've created handler
s to automatically map our config over to database solutions help people get off the ground:
jsonapi-server
and powers the core test suite.jsonapi-server
. More info can be found heresequelize
to support PostgreSQL, MySQL, MSSQL, MariaDB and SQLite.We've also written a library to ease the consumption of a json:api compliant service, if GraphQL isn't your thing:
You can have a complete json:api server providing a photos
resource with just this:
var jsonApi = require("jsonapi-server");
jsonApi.setConfig({
port: 16006,
graphiql: true
});
jsonApi.define({
resource: "photos",
handlers: new jsonApi.MemoryHandler(),
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/
and your photos
resources will be at http://localhost:16006/photos
. The GraphiQL interface will be available at http://localhost:16006/
.
Fire up an example json:api
server using the resources mentioned in the official spec via:
$ git clone https://github.com/coding-blocks/jsonapi-server.git
$ npm install
$ npm start
then browse to the JSON:API endpoints:
http://localhost:16006/rest/photos
or, for GraphQL:
http://localhost:16006/rest/
the example implementation can be found here
FAQs
A config driven NodeJS framework implementing json:api
We found that @coding-blocks/jsonapi-server-integerid 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.