Another "failed to start application" question

I am trying to write a simple demo of a package I have written. I have started a few times and each time some edit to the server.js has caused a problem which generates a “failed to start…” message. Undoing the line(s) that caused the problem does not solve it. Making small changes to package.json does not solve it. The server log looks fine, and express is definitely starting OK.

I have restarted the project from scratch a couple of times now, but have now given up, waiting on a resolution to this. One example project is misty-pleasure.

Hi mchapman,

the problem is that the env variable PORT is not set in the .env file. It is used to connect to the mongo db database that you have to create to use the project. It is probably a requirement of the app you remixed from.

In order to make the application at least start, you can change line 41 of server.js. Replace process.env.PORT in that line with just 3000.

I hope this helps!

Good spot, thanks. The mongodb example used that, and I didn’t spot the clash.