Change the type of Repl

Describe your feature request
I want to be able to change the type of Repl from HTML to Node. I would normally delete the Repl and recreate it uploading files etc, but if I delete the Repl I lose likes, comments, etc. So I would like to change the type of Repl without losing comments and stuff, basically that the Repl ID stays the same.

Usually, you can just change Nix packages and the .replit config, but with HTML Repls you can’t as hosting is hard-coded for them. There isn’t even a console tab.

What problem(s) would this feature solve?
I made a popular HTML Repl with static content and now I need to add an Express backend for dynamic content or whatever, and I don’t want the Repl to lose its comments, likes, etc.

Explain what you were trying to do when you came across the problem leading to this feature request
Making some analytics for Bookie’s Bounce.css, he has an HTML Repl but now it would have to be a Node.js Repl.

You can make a sepret repl for the backend but still have everything display on the original repl.

Not for analytics and statistics, as I need the backend to count requests, referers, etc.

1 Like

Just use Nix to update the repl as needed? I think even HTML repls have that.

HTML Repls have Nix, but as it says in their .replit file:

# hosting is currently hardcoded for this language

Hosting cannot be disabled, and therefore I can’t have Node.js run a server on an HTML Repl and intercept the requests.

For this use case, you can insert an empty element with a unique id, display set to none, and have some style property with some value. You can then make the property have a different value in the stylesheet, and check for the different value with JS to see when the CSS loads.

Make the repl redirect to the nodejs one, so once ppl run it they would actually be getting nodejs repl.