HTML, CSS, JS Static Hosting Doesn't Update When Files are Created With SSH

Problem description:
When I use SSH to create and edit a file in a static HTML, CSS, and JS Repl the website doesn’t always host the file immediately–I have to edit in the web editor before it gets served.

Expected behavior:
Despite not editing the file in the Replit web editor, the static Repl should automatically serve my new file.

Steps to reproduce:

  • Create a new HTML, CSS, and JS Repl
  • Setup SSH
  • Open the Repl in VSCode (it might work using plain SSH + echo “example” > example.txt)
  • Attempt to access the file from URL. This should not work.
  • Open the file in the Replit web editor
  • Edit the file
  • Try again to access the file from URL. It should work this time.

Brave 1.50.119 / Windows 11 Version 10.0.22621 Build 22621 / Dell Inspiron 5680

I really have no clue so take this theory with a grain of salt, this might be because Replit’s static hosting doesn’t refresh the hosted files until you press run inside the Replit editor, so there’s likely some trigger to actually host new versions of files which isn’t being triggered automatically when you just edit files via SSH.

1 Like

I thought that was unnecessary. I thought I remembered just refreshing whatever tab I had my static site open in and it was then up to date, without hitting “Run”. I know that’s how it works with other kinds of static hosting and I thought Replit was the same. I could be wrong.