Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How the rocket found the app dir? #5

Open
Praying opened this issue Oct 29, 2018 · 2 comments
Open

How the rocket found the app dir? #5

Praying opened this issue Oct 29, 2018 · 2 comments

Comments

@Praying
Copy link

Praying commented Oct 29, 2018

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

@piedoom
Copy link
Contributor

piedoom commented Oct 29, 2018

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.

@Praying
Copy link
Author

Praying commented Oct 30, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants