yysun / apprun

AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.
https://apprun.js.org
MIT License
1.18k stars 57 forks source link

Cannot GET / #126

Closed jkleiser closed 2 years ago

jkleiser commented 2 years ago

I just made a new app by doing npx apprun --init --spa. When I try to run it with npm start, I get Cannot GET / in my browser. Has that got something to do with this message I got while installing:

npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

I'm using node v16.13.1 and npm v8.1.2.

yysun commented 2 years ago

It was because the webpack dev server serves static content from the public folder now. Please update the webpack.config.js by adding the static option.

  devServer: {
    open: true,
    static: path.join(__dirname),
  },

I will update the CLI to support the public folder.

jkleiser commented 2 years ago

Thanks a lot. I went for this other variant instead: npx apprun --init --esbuild. It gives me a simpler app, but maybe that's all I need for now. It's quite some time now since I started on a new project. It feels good. I'm curious to see how it turns out.

yysun commented 2 years ago

Thank you for your long-time support!

yysun commented 2 years ago

Fixed in 3.28.8