node.js - configure NodeJS process on two different machine -


i have 2 different nodejs web app running on 2 different machine.

but need have 1 endpoint user api1.abc.com/v1 go 1 process , api2.abc.com/v2 go process.

how can kind of request single endpoint user (abc.com). need nginx setup guide ?

i need setup because internally need call user authenticated api 1 server another.

on 1 server need receive data (using express & router):

router.get('/v1', function(req, res) {   // todo   res.render('something'); }); 

and on other need fetch:

var express = require('express'); var router = express.router();  var app = express()      app.use('api1.abc.com', router);  router.post('/v1', function(req, res) {   // process res }); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -