Assign a keyboard shortcut to restart a project

Well as we all know discord will decline requests on connecting to their server while hosting bots. So we keep a throttle of 15 mins to restart after changing the files in the project.
So we could be able to fix this by using a keyboard shortcut to restart the project instead of going to watch.json and enter a wrong character and remove that character.
This could even work for those who dont want to instantaneously restart their project when they do changes to the file

I don’t really see any need for this. If you want to keep a project up and not going offline every 15 minutes you can use other services like Awake! or Uptime Robot.
Or if you mean something like “don’t push the new changes immediately on edit”, you could just merge your Glitch project to Github and edit it there until you’re ready to push it and then import it to Glitch.

Alternatively, take a look at stop-default-commits if you’re interested in disabling the auto commit functionality on Glitch.

Does disabling the ‘Refresh App on Changes’ option help?

The idea of pushing changes on github and after completion importing it to glitch is nice but instead of this it will be nicer if they had provided a clean git system like heroku has where you can add a git url
you can defend it by saying there is an option already but that has so many glitches. I tried to force push changes to glitch but still it gave me errors. And it has no security anyone with your git url can pull and push changes to your project

And also glitch’s main usp is online editing if we start using github to import and export then it would lose its usp

if you stop using watch.json and stop refreshing app on changes to update changes you should open your console everytime to restart your server

Unique selling proposition?

yepp! yes it is also know as Unique Selling point

I use the torc addon set (pretty nice set of tools), and it has an Update button, which adds/updates a file called .torc-update with a timestamp and a smiley face, I removed throttle from my watch.json, but tinkered with the restart section to only restart when the .torc-update changes.

{
  "install": {
    "include": [
      "^package\\.json$",
      "^\\.env$"
    ]
  },
  "restart": {
    "exclude": [
      "^public/",
      "^dist/"
    ],
    "include": [
      "\\.json",
      "\\.torc-update"
    ]
  }
}
1 Like