Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

traveloka-archive/request-transport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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