Hi, new to digitalocean and deploying and all that stuff. But I get a very strange error when deploying my express application.
My droplet is a ubuntu with nodejs and the application is a standard express application generated through: $ express myapp …
so there is nothing fancy about the code but I get an error when trying to load in css and other static files using: app.use(express.static(path.join(__dirname, ‘public’)));
and then i get ERR_CONNECTION_REFUSED in the console for my files.
the strange part is that it´s all working on my local node server.
Does anyone have any suggestions or fix for this problem?
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!