App restarts constantly while trying to completely disable auto restarts

Even though I’m not writing any code or changing any files, my app is constantly restarting. This happened while I was trying to disable auto-restarts.!/displex-bot

Hello, @lpc, welcome to the Glitch Forums!

What’s happening here is that Glitch attempts to start your project until it sees something listening to a port. Typically in remixes of our starter projects that’s built in when the project opens a listener to process.env.PORT usually using Express. In your case that was in the server.js file that your package.json had configured Node to execute when your project started up. When you edited your project and deleted server.js and to start your new barebones index.js your project stopped listening to any ports and so Glitch keeps trying to start it up.

If you use Rewind to look at!/displex-bot?path=server.js:36:0 you can see where Express was configuring its listener. Even though it looks like you’re working on a Discord bot you’ll need to configure something to listen for Glitch to stop trying to restart.

Hope this helps! Happy Glitching!

1 Like