
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
A TypeScript framework to create APIs following the [1.1 Spec of JSONAPI](https://jsonapi.org/format/1.1/) + the [Operations proposal spec](https://github.com/json-api/json-api/blob/999e6df77b28549d6c37b163b73c8e9102400020/_format/1.1/index.md#operations)
A TypeScript framework to create APIs following the 1.1 Spec of JSONAPI + the Operations proposal spec.
belongsTo
/ hasMany
helpers on their declarations. Kurier provides proper, compliant serialization to connect resources and even serve them all together on a single response.MyExternalApiProcessor
extending from OperationProcessor
and implement the necessary calls et voilà!.▶ Click right here to get started with TypeScript, a dockerized database, basic user management support, HTTP logs and more.
Create your project using the GitHub CLI and with one of our starter packs:
# Create a TypeScript + Kurier API.
npx gh repo create my-api-with-kurier -p kurierjs/kurier-starter-pack-typescript
# Create a JavaScript + Kurier API.
npx gh repo create my-api-with-kurier -p kurierjs/kurier-starter-pack-javascript
Note: This example assumes a TypeScript environment with several dependencies preinstalled.
Install the package with npm
or yarn
:
$ npm i kurier # or yarn add kurier
Create a Resource:
import { Resource } from "kurier";
export default class Author extends Resource {
static schema = {
attributes: {
firstName: String,
lastName: String,
},
};
}
Create an Application and inject it into your server. For example, let's say you've installed Koa in your Node application and want to expose JSONAPI via HTTP:
import { Application, jsonApiKoa, KnexProcessor } from "kurier";
import Koa from "koa";
import Author from "./author";
const app = new Application({
namespace: "api",
types: [Author],
defaultProcessor: new KnexProcessor(/* your knex DB connection settings */),
});
const api = new Koa();
api.use(jsonApiKoa(app));
api.listen(3000);
Run the Node app, open a browser and navigate to http://localhost:3000/api/authors
. You should get an empty response like this:
{
"data": [],
"included": []
}
Add some data to the "authors" table and go back to the previous URL. You'll start seeing your data!
{
"data": [
{
"id": 1,
"type": "author",
"attributes": {
"firstName": "John",
"lastName": "Katzenbach"
}
}
],
"included": []
}
Extend Kurier's features with these addons:
@kurier/addon-many-to-many
creates intermediate resource types for many-to-many relationships.@kurier/addon-auto-include
alters GET operations to automatically include relationships.@kurier/addon-nextjs-auth0
integrates authorization mechanisms provided by nextjs-auth0
into Kurier.@kurier/addon-transport-layer-context
allows Kurier processors to know the client's IP address and request headers via ApplicationInstance.We've created a template repository for developers who want to build their own addons. Check it out here!
Jump-start your project with these preconfigured, opinionated starter packs. They all include a dockerized database, HTTP logs, linting and basic user management.
Check out our updated docs at ReadTheDocs. There you will find more info and examples.
We have a little contributors guide now! Take a look at it in here.
FAQs
A TypeScript framework to create APIs following the [1.1 Spec of JSONAPI](https://jsonapi.org/format/1.1/) + the [Operations proposal spec](https://github.com/json-api/json-api/blob/999e6df77b28549d6c37b163b73c8e9102400020/_format/1.1/index.md#operations)
We found that kurier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.