I was trying to deploy a simple Node.js app which uses parcel. When deploying I get a successful deployment but the page does not display and I get these errors:
[lit-chat] [2022-03-23 22:08:23] yarn run v1.22.18 [lit-chat] [2022-03-23 22:08:23] $ parcel index.html [lit-chat] [2022-03-23 22:08:50] Server running at http://localhost:8080 [lit-chat] [2022-03-23 22:08:50] Building…
How do I tell the deployment to bind to the given public url? I have tried specifying the --public-url in package.json as well but there was no change.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
I believe that you should be able to specify the host that your Parcel app binds on using the
In your case you could use
--host 0.0.0.0so that the Parcel app would be accessible from the outside world.
Alternatively, you could leave the app on localhost and use Nginx as a reverse proxy. For more information on how to do that you can take a look at step 5 here:
Hope that this helps.