I built a website using node.js, mongodb, and express.
My website allegedly deployed successfully, but when I followed the link given, I’m returned with a blank screen saying “not found”
Console:
Failed to load resource: the server responded with a status of 404 ()
I suspect the error is probably in my build and deploy settings, where I had absolutely no clue what to put for them.
Your screenshot shows you’ve created a Static Site. If you want to use Express, you’ll need a Web Service. We have a basic guide on deploying Express apps: Deploy a Node Express App | Render Docs
so I tried to deploy it on a web service, but when I click on the link I get a page saying
{“message”:“”,“name”:“AggregateError”,“stack”:“AggregateError\n at internalConnectMultiple (node:net:1114:18)\n at afterConnectMultiple (node:net:1667:5)”,“config”:{“url”:“http://localhost:3000/api/users",“method”:“get”,“headers”:{“Accept”:"application/json, text/plain, /”,“User-Agent”:“axios/0.21.4”},“transformRequest”:[null],“transformResponse”:[null],“timeout”:0,“xsrfCookieName”:“XSRF-TOKEN”,“xsrfHeaderName”:“X-XSRF-TOKEN”,“maxContentLength”:-1,“maxBodyLength”:-1,“transitional”:{“silentJSONParsing”:true,“forcedJSONParsing”:true,“clarifyTimeoutError”:false}},“code”:“ECONNREFUSED”}
Specific app and code implementation is be beyond the scope of our support. Maybe other community members may be able to assist.
However, you mention the error occurs when you click on something, so I’m assuming this is a front-end/client side issue. At a guess you have some Javascript hardcoded to http://localhost:3000/ which would need to be updated to your deployed URLs.