resamplr-web icon indicating copy to clipboard operation
resamplr-web copied to clipboard

How the rocket found the app dir?

Open Praying opened this issue 7 years ago • 2 comments

It seems that no code tell the app dir to rocket, and function index can use public directly?

Praying avatar Oct 29 '18 12:10 Praying

I haven't looked at this code in a bit, so I might be wrong about this.

There is nothing telling Rocket what file to render. It's a headless backend and only really serves JSON. It doesn't handle routing or serving html files. That's all done within Elm and Gulp which creates a server (powered by Node/NPM) here. So when you run this app, you're really running two servers: one that handles the frontend serving (elm), and one that handles the backend (rust).

I haven't released this to production but if you were, I would think that the static elm files should be served via an Nginx reverse proxy or something similar.

piedoom avatar Oct 29 '18 19:10 piedoom

The dir public need to be generate by manual, such as vue.

Praying avatar Oct 30 '18 08:10 Praying