node.js - Django and Node processes for the same domain -


hi have 2 process

  1. django , mysql
  2. node/express , mongo db.

1.

how can configure 2 process point different url like. django point api.abc.com/v1 , node point api.abc.com/v2 ?

2.

all user login inside django , mysql oauth. can authenticate user in django.

but how can authenticate user in nodejs app token send django rest oauth ?

thanks.

scenario a

you create url in django ^v2/.*$ , make request django view node.js process. way django can handle user auth , permissions , node can standalone , not know user auth. if need user data (id or something) can inject in request header or cookie.

scenario b dig django rest oauth implementation, find tokens stored in db, , on each request take oauth token header/cookie , compare 1 in db. have setup nginx reverse proxy , route traffic goes on url /v1/.*$ django app, , traffic goes /v2/.*/ node app.

either options doable suggest scenario a. it's easier, quicker , far less error prone.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -