1

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

1 Answer 1

1

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;
}
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for answer. If i want to deploy both node js and webapp2 on google cloud app engine, then how i will manage? e.g lynkweb-165106.appspot.com i have this domain how i will run both node js and python code over it Thanks
How i will use both python and node js on same domain on google app engine?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.