forked from mirrors/homebox
ci: end-to-end CI testing (#1)
* do end-to-end testing * set node version * build then start * remove test restrictions * panic if mime type fails * use timeout
This commit is contained in:
parent
ad4c8c9ab4
commit
7ccd48ad79
4 changed files with 26 additions and 16 deletions
|
@ -107,8 +107,15 @@ func (a *app) LogRoutes(r *chi.Mux) {
|
|||
var ErrDir = errors.New("path is dir")
|
||||
|
||||
func init() {
|
||||
mime.AddExtensionType(".js", "application/javascript")
|
||||
mime.AddExtensionType(".mjs", "application/javascript")
|
||||
err := mime.AddExtensionType(".js", "application/javascript")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = mime.AddExtensionType(".mjs", "application/javascript")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func tryRead(fs embed.FS, prefix, requestedPath string, w http.ResponseWriter) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue