Skip to content
New issue

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

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

Already on GitHub? # to your account

Serve public files from root instead of /pj and /pj/static #55

Merged
merged 2 commits into from
Nov 13, 2022

Conversation

nickfarrow
Copy link
Collaborator

Moves nolooking website from /pj to /, while keeping the payjoin POST /pj and other endpoints the same.

Copy link
Contributor

@0xBEEFCAF3 0xBEEFCAF3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@DanGould
Copy link
Contributor

DanGould commented Nov 9, 2022

I understand the what, but why?

@nickfarrow
Copy link
Collaborator Author

I keep getting caught out using the wrong paths for static files, (all the favicon paths had to be prefixed). On umbrel it'd be nice to be able to open up using IP:port, rather than see an error. Unless there's a reason to use /pj?

Even further, would it be possible to get rid of the /static/ too and just host out of /?

@0xBEEFCAF3
Copy link
Contributor

Keeping the home page on / makes the most sense unless we plan to add a different homepage

In the future we can prefix our API paths too: api/some_version/

@DanGould DanGould changed the title Move site from pj to server root Move public files from /pj and /pj/static to server root Nov 9, 2022
@DanGould
Copy link
Contributor

DanGould commented Nov 9, 2022

Oh yeah, this is crazy. The folder should really be called /public now too since we generate qr_codes into it. It's not only static files

@DanGould DanGould changed the title Move public files from /pj and /pj/static to server root Serve public files from root instead of /pj and /pj/static Nov 9, 2022
Keep the payjoin POST /pj and other endpoints the same. Now we
don't have to prefix with /pj/static to use every file from html.
Access the index page from the host without /pj. Match convention
on umbrel with access at ip:port
@DanGould
Copy link
Contributor

Even further, would it be possible to get rid of the /static/ too and just host out of /?

This does that now

Because QR codes generate in the folder, it is not static. The name
"public" is a rails convention for this folder that makes sense to me.
@nickfarrow
Copy link
Collaborator Author

tACK

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

Successfully merging this pull request may close these issues.

3 participants