Skip to content

canvasxyz/express-ipld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-ipld

Express middleware for dag-json and dag-cbor IPLD codecs.

Usage:

import express from "express";
import ipld from "express-ipld";

const app = express();

app.use(
	ipld({
		type: ["application/json", "application/cbor"],
	}),
);

app.post("/", (req, res) => {
	// if request has content-type application/json or application/cbor,
	// req.body will be parsed using dag-json / dag-cbor
	// ...
});

About

Express middleware for dag-json and dag-cbor IPLD codecs

Resources

License

Stars

Watchers

Forks

Packages

No packages published