0.1.2 • Published 3 months ago

edge.libx.js v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

🗡️ edge.libx.js

Provider-agnostic, edge-compatible, itty-router microrouter wrapper. Allowing you to crete multi-route endpoints that can work with Cloudflare, Vercel, Google Cloud Functions, Netlify Functions, and any other provider.

Get Started:

import { Route, Router, RouterType, error, json, cors, text } from 'itty-router';
import { RouterWrapper } from 'edge.libx.js';

const routerWrapper = RouterWrapper.getNew('/v1');

routerWrapper.router.all('/ping', async (req) => {
	return json({ message: 'pong' });
});

Useful package.json scripts:

...
    "scripts": {
        "build": "tsc",
        "debug": "tsx --inspect -r dotenv/config node_modules/edge.libx.js/src/helpers/localServer.ts src/index.ts",
        "debug:watch": "nodemon --watch 'src/**/*.ts' --exec tsx --inspect -r dotenv/config node_modules/edge.libx.js/src/helpers/localServer.ts src/index.ts",

        "set-secrets": "set-secrets .env.preview preview \"vercel env add\" remove",

    }
...

Contribute:

Build:

$ bun run build

Watch & Build:

$ bun run watch

Run tests:

$ bun run test <optional: path-to-test-file>


Scaffolded with 🏗 TS-scaffold

0.1.2

3 months ago

0.1.1

4 months ago

0.1.0

7 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago