I am currently working on a portfolio, I’ve decided to make it look better with express (using express to remove file extensions such as .html), but now the site gets turned off after 5 minutes.
This is extremely annoying. I do not understand why this can continue to be ‘static’. I am unsure if a developer would be able to fix this to some extent.
Ok, that is why. Non-static projects go to sleep after 5 minutes to keep Glitch fast, and awake when someone visits your site. To prevent that from happening, you can buy Glitch premium here.
That was not the purpose of this post. I am aware non-static projects go to sleep after 5 minutes. I am saying that having express should NOT make the project ‘unstaticed’. Glitch premium is not something that is something someone should have to buy just to not have file extentions.
When you’re using Express, it becomes a Node.js app. When you use Node.js, it requires a package.json. When you have a package.json file, it becomes (both technically and Glitch-ically) a dynamic or non-static app.
Migrate the files from about.html to about/index.html and you should be good to go!
The reason that express goes to sleep is its a nodejs server meaning it costs a lot more to run. html files just sit in directory and are served upon request as they are prebuilt.