I have created my project in python (Webapp2), but i want to create admin panel in node js and set it in same directory.
I am facing problem how to route node app.js from url
Docker is the best option. Use docker and create three container (nginx, nodejs, Webapp2).
for nodejs, use port like 8080
for Webapp2, use port like 8000
links nodejs and Webapp2 with ngninx in docker-compose.yml and configure nginx.conf file.
Use nginx.conf like
location /dashboard {
proxy_pass http://nodejs:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_pass http://webapp2:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}