mufeedvh / binserve

A fast production-ready static web server with TLS (HTTPS), routing, hot reloading, caching, templating, and security in a single-binary you can set up with zero code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows Version throws 404

peschu123 opened this issue · comments

Hi,
I have a static web app generated from nuxt.
Problem:
When I press a reload button I get an Error 404. This only happens in binserve windows. With the exact same config and same public folder this error does not happen in linux.
I also tested the static page with caddy and simple-http-server and it worked. Not as fast as with binserve, but it works. ;-)

The page was created by a third party and I'm no html/javascript expert.
The nuxt button component is written like this and vue-router is 3.6.x:

<template>
  <v-btn
    class="reset-button"
    @click="resetState"
    outlined
    elevation="1"
    :ripple="false"
  >
    <v-icon>mdi-refresh</v-icon>Start Fresh
  </v-btn>
</template>

<script>
import { defineComponent } from 'vue';

export default defineComponent({
  name: "Reload",
  setup() {
    const resetState = () => {
      location.reload();
    };

    return {
      resetState,
    };
  },
});
</script>

But since it works on linux and on other web server, I guess this must be some error or something i did not configure right.

binserve.json

{
    "server": {
        "host": "127.0.0.1:3000"
    },

    "routes": {
        "/": "public"
    }, 

    "config": {
        "enable_hot_reload": false,
        "fast_mem_cache": false,
        "enable_cache_control": true,
        "enable_directory_listing": false,
        "minify_html": false,
        "follow_symlinks": false,
        "enable_logging": false
    }
}

I tried several combinations of the config settings. Does not seem to make a difference.
Some clarification about the paths in the docs would be nice, especially for the windows case.