Support Forums

Can't Get Basic Server To Work

I’ve just gotten into to web development so I hope this answer to this question isn’t too trivial. I was trying to make a simple webpage with a couple routes using express js. When I go to deploy the site the build gets stuck and never fully deploys. The site works completely fine when I use local host but on Netlify it does not work at all. My site is https://comque.netlify.app/

Here is a screenshot of the build log
Here is my code

My current deploy settings are the publish directory set to dist and the run command set to npm start.

I’ve tried taking out the build command, taking out the publishing dir, and doing a combo of both but none work.

Thanks in advance for the help!

Hi @adameco

Short answer: It won’t work. You can’t run a server. You need a build command such as npm run build which then uses something like React, Next.js, NuxtJS, et.al. to generate your site.

Detailed answer:

Hope this helps.