Are there any limitations with just HTML files with no backend?


#1

Hi! I had a HTML file that was working locally, got it working on Glitch, and then a couple of hours later it goes down with the failed to start application error message.

So I decided to try to just get something up, so I cleared out the whole file, deleted all the other files, and just did a simple:

<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>

I still get the failed to start application error message. I did notice in the logs this error message, but this message also showed when the previous HTML file was rendering:

SyntaxError: Unexpected end of JSON input
    at Object.parse (native)
    at /etc/service/watcher/source/app-picker.coffee:71:31
    at ChildProcess.exithandler (child_process.js:197:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Any idea what might be causing this? Are there limitations with HTML files with no backend I should know about? Thanks!


#2

there are no known limitations, but you’ll still need to keep the server.js and package.json files included with the default welcome project to set up static file serving. If you give us the name of the project we’ll look into it?


#3

This might be useful: https://glitch.com/edit/#!/minimal-http-server


#4

I was wondering if you need them to keep it working. It worked for a while without, so it made me question it.

fast-drive is where I was testing this out.


#5

ya you need them because otherwise the server won’t know how to serve the files

(the lower level you go, the more power you’ve got, but also the more you realize how dumb computers actually are)

Hope that helps


#6

Definitely helps!

If you happen to know, why did it work for a while? Like how did it know what files to serve and then didn’t?


#7

possibly due to the browser caching a working copy of the html? This might happen if you did the html, opened the app in your browser (when the cache gets created), then deleted the server files.