The removed "bare-server-node" dependency is discouraged in favor of the
better "@tomphttp/bare-server-node" package.
This commit closes#10 as a result.
This change may improve caching for static assets. However, most HTTP
requests are directed to the Bare server, so the improvement the max-age
value makes may be negligible.
If a user navigates to a UV link directly, without the service worker
registered, Cyclone's bare server will take over and interpret the URL
as http://go/..., which you definitely didn't want, unless you happen
to work at Google :P
Prior to this commit, Osana was not minified at all. This commit updates
Osana so it is minified. Refraining from minification is just asking for
longer load times.
The block inside `if (proxy == 'uv' || 'osana')` is always going to run,
because 'osana' is a truthy value. I hope those aren't bad habits from
Python.
In Cyclone's fetchBare(), the content type wasn't correct, and the
status line should be "Internal Server Error", not just "Error". In
the main request handler, I added similar error handling, just in case.
The error handling in the catch block led to a bug where the request's
body was piped to Cyclone's response. However, since the mock request in
the catch block doesn't have a body property, let alone a pipe method,
that line throws an error.
By default, paths in Node.js are resolved based upon the current
directory. This is problematic when the server is started from the home
directory or through systemd. This commit ensures static files are read
relative to app.js's path, instead of the current directory.
app.js was originally a stub that imported app.mjs, which is redundant.
This change is split into two commits to preserve Git history for what
is now app.js.
The license field is supposed to have a short identifier representing
the project's license, like "MIT". The keywords field is for npm's
search, if this package is ever published.