npm.devtool.tech
👏 You can access 15ms-router package with using 15MsRouter variable in browser devtools!
A domain name access HTTP API server.

code/package/bundle size

0B
publish
0B
install
0B
bundle minified
0B
bundle gzipped

15ms-router

A short link server.

Usage

install as dependency

npm install --save 15ms-router@latest

use API to start server

const jumpServer = require('15ms-router');

jumpServer({
  name: 'YOUR-APP-NAME',
  secure: {
    public: '', // optional: public key file
    private: '', // only for debug, private key file
  },
  router: {
    rootdir: 'data-dir', // optional: local data directory
    cache: {}, // optional: lru-cache options
  },
  remote: {
    connect: 'mysql://', // mysql connect string
  }
});

call server HTTP APIs

var secure = new Secure({
  private: ''
});
/*
sign(
  HEX,
  SHA256,
  JSON({ verb, data, time = YYYY-MM-DD HH:mm })
)
*/

var payload = {
  verb: 'action',
  data: {},
  hash: secure.createHash(verb, data)
}

fetch('http://15ms', {
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  body: JSON.stringify(payload)
});

action: bind

{ name, href, code }

action: kill

{ name, code }

action: find

{ name }

action: list

{ }

access to short link

Open http://15ms/your-link and redirect to target.

🔎Explore Package🔎CDN Script

Score

Popularity2/100
Quality77/100
Maintenance100/100