B4J Question Finalize New B4J Server With Hello World Test App

cklester

Well-Known Member
Licensed User
I've downloaded the ServerExampleNoMySQL.b4j project from [WebApp] Web Apps Overview. It is now running at B4XDev.com/webapp/.

However, some of the pages don't seem to be loading correctly (e.g., the Quiz App).

I am passing websocket requests thru nginx. Here, the relevant parts, is my config file for that:

B4X:
server {

    location /webapp/ {
        proxy_pass http://127.0.0.1:51042/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $http_x_forwarded_for;
        proxy_redirect http://$host:51042/ http://$host/webapp/;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

So, I have the Upgrade and Connection headers set. What might be wrong?
 
Last edited:

cklester

Well-Known Member
Licensed User
So, if I'm proxying the server, does that mean I have to rearrange resources (like, move the b4j_ws.js file so B4J server (or nginx(?)) sees it) or update links in the HTML files (maybe use "../b4j_ws.js")?

Or should it work as-is?
 
Upvote 0

cklester

Well-Known Member
Licensed User
I set it up at B4XDev.com, and it works fine. So it's the subdirectory that's fouling things up...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…