request-transport

1.4.1 • Public • Published

request-transport

Locale Aware Nodejs Router

Examples

let router = new Router();
router.register('localhost:29099', ['en', 'id-id', 'en-id', 'en-sg'], 'id-id', path => {
  path.register('HOME', 'get', 'http', '/', Home);
  path.register('SIGNUP', ['get', 'post'], ['http', 'https'], '/signup', Signup);
  path.register('PROFILE', 'get', 'http', '/profile/:username', Profile);
});

Try The Framework

git clone git@github.com:traveloka/request-transport.git
cd request-transport/examples/locale-by-path-prefix
npm install
npm run build
node lib/index.js

*use sudo if setup failed

Then open localhost:29099/en-id

Package Sidebar

Install

npm i request-transport

Weekly Downloads

258

Version

1.4.1

License

MIT

Unpacked Size

27.2 kB

Total Files

12

Last publish

Collaborators

  • asendia