Make it so we can change the way glitch starts projects

I think it would be nice if glitch had an option where we can change the way the project starts.
ex.
node server.js > log.txt

This would make it so everytime you edit the project, it would start the project while logging the console to log.txt!

Actually, this is a feature. It does not node server.js instead, it does npm start where you can edit the start script in the package.json file. There is also glitch.json which is for other things.

As @DouglasACheese said, this is already a feature; you’re not actually limited to using node at all. However, package.json must exist in your project in order for it to start any application. In the scripts.start property you can define your own sequence of commands in order to start your project.

@ihack2712 using glitch.json when the project is neither python or node.js is better.

What do you mean glitch.json, isn’t it watch.json? And as far as I know, it won’t allow you to change the start command, can you clarify?

glitch.json has install ,start and watch properties.

1 Like

Huh… Will you look at that… I wonder why glitch.json hasn’t been submitted in any Glitch’s help articles.

// glitch.json
{
  "start": "echo start",
  "install": "echo install"
}
2 Likes

Yeah, Glitch.json is a lot of fun to mess around with. I used to use it for the PHP webserver (but later found out that shouldn’t be used in production!!)

3 Likes