https server starts with non existing key and certificate files without any hint that something went wrong
nenadalm opened this issue · comments
Here is place that reads files:
macchiato-core/src/macchiato/server.cljs
Line 28 in 8660c2f
but in case of non existent files, it just proceeds silently (https://github.com/macchiato-framework/macchiato-fs/blob/1561f573de04d373aa3ae8b233b25f5f4abc1052/src/macchiato/fs.cljs#L27)
I noticed this on ci
, where I've got message that server started, but curl wouldn't return status 200
when checking if started.
Maybe slurp
in macchiato-fs
should return exception as it does in Clojure
? Or macchiato-core
should check if files exists?
Yeah, I think slurp
throwing an exception would be the way to go. I'll try take a look soonish, but if you'd be up for doing a PR I can do a new release with it as well.