UNPKG

service-router

Version:

router to bounce requests to either api or web servers

28 lines (22 loc) 844 B
# DocParse Router A seaport & bouncy powered router to bounce requests to the appropriate service provider ## Services Currently there a two services: **api** and **web**. Any url that looks like [http://localhost:3000/api/](http://localhost:3000/api) will be bounced to the api server. All other requests will be handled be the web server. ### Configuration Note that a local_config.json file path must be supplied as a --config argument when running the *spinUpRouter.js* file ``` node spinUpRouter.js --config test/local_config.json ``` The local_config.json file should specify at a minimum the port seaport will listen on, as well as the external application port that the clients will connect to. ``` { seaport: { "host": "localhost", "port": 9000, }, application: { "host": "localhost", "port": 3000 } } ```