AlexTatiyants / pev

Postgres Explain Visualizer
MIT License
2.77k stars 194 forks source link

Can not access over network #38

Closed rtwk closed 6 years ago

rtwk commented 6 years ago

I have installed the project on a Ubuntu 16 machine. I go to the folder directory and I npm start opens a new browser tab 'http://localhost:5555/dist/dev/#/plans' and I can access the software. I want it to be accessed from other machines of my lan. So I made changes in nginx;

location /pev { proxy_pass http://localhost:5555/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } But when I try to access 192.168.0.105:/pev, I can't access. But I can access another node app for which nginx configuration is : location /demo { proxy_pass http://localhost:3000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } How to fix this?

rtwk commented 6 years ago

I changed nginx configuration to proxy_pass http://localhost:5555/dist/dev/#/plans; Now when I point my browser to http://192.168.0.103/pev it says 'Loading....' in browser.

rtwk commented 6 years ago

I changed server.listen(PORT, () => //openResource('http://localhost:' + PORT + APP_BASE + APP_DEST) openResource('http://192.168.0.103:' + PORT + APP_BASE + APP_DEST) ); in /tools/utils/server.ts and now it can be accessed over network. Closing the issue.