How do I make 2 scripts run on start up?

I’d like to have a web server start, as well as some JS for a TwitchBot.

As it stands, I can only run 1 script at a time.

“scripts”: {
“start”: “node bot.js && node server.js”

only runs bot.js, even though I want it to run both bot.js and server.js in parallel.

Any thoughts?

1 Like

Welcome @TechPhil,

In your bot.js file, can you put the following at the very top of the file!


and remove “&& node server.js” from your package.json and tell me if that helps at all! :slight_smile:


That worked! Thanks so much! I was stuck for ages!


Glad I could be of assistance!

Happy Glitching! :slight_smile:


how to run java lavalink and server.js at the same time

You cannot run Lavalink on Glitch since glitch uses a different version of JDA which Lavalink does not support.

1 Like

Also, lavalink uses java and I don’t think you could combine .java and .js files.