Application stuck on starting

Hello! I have been developing a discord bot for the past few weeks and for some reason the app keeps staying on “Starting…”. This issue has happened in the past too and when I asked on what should I do I got recommended to put the variables on the .env but that did nothing too. Here is the bot:

Try to change this line in your package.json

 "main": "index.js",


 "main": "server.js",

Did so, nothing seems to have changed.

I remix it and your code works for me.

Maybe discord ban the glitch host where is your bot:

Remix your own project and if this doesn’t work maybe @cori can help to you moving your project to another host.

Nope, did not work. What do you mean by host though? The URL?

I mean the IP of the glitch host. Nothing wrong with your project.

Hiya @vamik64, I think the problem you’re running into is that your project never starts listening to an open port - Glitch watches for a listener to be attached, and until it sees one it thinks your project isn’t ready and keeps trying to restart it.

Adding Express to your package.json file and then adding something like this sample express config should get you on the right track.

Happy Glitching!

1 Like