5.0.14 • Published 9 months ago

@podium/dev-tool v5.0.14

Weekly downloads
8
License
MIT
Repository
github
Last release
9 months ago

@podium/dev-tool

Tool that exposes a development API on Podium podlets for use in browser development tools.

Getting started

Install the developer tool module:

npm install @podium/dev-tool

Then configure it in your podlet:

import express from "express";
import Podlet from "@podium/podlet";
import DevTool from "@podium/dev-tool";

const app = express();

const podlet = new Podlet({
	name: "myPodlet",
	version: "1.0.0",
	pathname: "/",
	development: true,
});

podlet.defaults({
	token: "as3d24asd34asd4",
	mountOrigin: "/testing",
});

const devTool = new DevTool({
	logger: console,
});
devTool.register(podlet);

app.use(podlet.middleware());

app.get(podlet.manifest(), (req, res) => {
	res.json(podlet);
});

app.get(podlet.content(), (req, res) => {
	res.json({ context: res.locals.podium.context });
});

app.listen(7100);
await devTool.start();

Endpoints

// GET http://localhost:8172/
// GET http://localhost:8172/podlet
// GET http://localhost:8172/podlet/:name
// GET http://localhost:8172/context
// GET http://localhost:8172/context/:name
// POST http://localhost:8172/context
// POST http://localhost:8172/context/:name
5.0.14

9 months ago

5.0.13

9 months ago

5.0.12

10 months ago

5.0.10

11 months ago

5.0.11

10 months ago

5.0.9

11 months ago

5.0.8

11 months ago

5.0.7

12 months ago

5.0.6

1 year ago

5.0.5

1 year ago

5.0.4

1 year ago

5.0.3

1 year ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

4.0.0

6 years ago

3.0.0-beta.1

6 years ago