Option to temporarily stop publishing the service

I would like to add an option to temporarily stop publishing services. I am sure you have all wanted to temporarily suspend publication due to code changes, etc.

Great idea, because for example if you are working on a popular website changing code then someone visiting the website could get caught in the middle of that with your website not working.
PS: No upvotes left? Vote here:

  • Vote

0 voters

I think what you are looking for is this:

No Autorestart – Uses a watch.json file and a rebuild trigger to manually trigger rebuilds
Avoiding rebuilding every time the container restarts – Another post that explains this better
Watch Json – A project dedicated to the watch.json file.

1 Like

Yep but a UI directly in Glitch’s editor (like tools → disable auto update and then a button on the right corner) would be really awesome :+1:

I put an alternate start command in my package.json sort of “commented out”

{
  ...
  "scripts": {
    "start": "node server.js",
    "//start": "cd greeter && python3 -m http.server $PORT",
  },
  ...
}
2 Likes

Unfortunately for that the project wouldn’t be static

the project doesn’t exhibit any characteristics of being static while you’re editing it anyway (:

1 Like

Oh. If you want to do this for a static project, the only way I know how to do it would to have an index.html file, and then another .HTML file that you preview and edit, then copy over the HTML you edit to the index file.

1 Like

Thanks for the suggestions (and workarounds!) everyone, this is something we’ve been talking a lot about internally and will hopefully have something easier than alternating start scripts :heart_eyes:

2 Likes