1.0.1 • Published 22 days ago

@calindra/cartesify-backend v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
22 days ago

Cartesify Backend

This package is intended to be used with @calindra/cartesify.

// Cartesify REST bridge
const { CartesifyBackend } = require("@calindra/cartesify-backend")

CartesifyBackend.createDapp().then(dapp => {
    dapp.start().catch((e) => {
        console.error(e);
        process.exit(1);
    });
});

// Normal nodejs application using express
const express = require("express");

const app = express();
const port = 8383;

app.use(express.json());

app.post("/your-endpoint", (req, res) => {
    const senderAddress = req.header("x-msg_sender");
    res.send({ some: "response", senderAddress });
});

app.listen(port, () => {
    console.log(`[server]: Server is running at http://localhost:${port}`);
});
1.0.1

22 days ago

1.0.0

22 days ago

0.1.2

2 months ago

0.1.1

3 months ago

0.1.0

3 months ago