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

Sample site code? #1

Closed
crazy4groovy opened this issue Jul 18, 2020 · 5 comments
Closed

Sample site code? #1

crazy4groovy opened this issue Jul 18, 2020 · 5 comments

Comments

@crazy4groovy
Copy link

Is the sample site code available for www.playliststar.com ?

I'm still not quite sure how I would run this on the backend of say, netlify, and still call it from my front end code. A few more instructions may help. Looks cool - Thanks!

@jlxw
Copy link
Owner

jlxw commented Jul 18, 2020

Thanks for checking this out!

Try looking at the html example here:
https://jlxw.github.io/static-json-db/example.html

@crazy4groovy
Copy link
Author

crazy4groovy commented Jul 18, 2020

OK, I get how I can run it from the browser side.

But I'm still confused about how to run this backend on a JAM stack.

(That page is obviously hosted by Github Pages, but I don't see it listed anywhere in the gh repo, in any branches or tags... 🤷)

@jlxw
Copy link
Owner

jlxw commented Jul 18, 2020

The Github Pages are in /docs :)

You'd still need Node to write to the database, then expose it via http or deploy it as a static site to be read by the browser.

I'll update the README to try and make this clearer.

@crazy4groovy
Copy link
Author

Ah I understand a little bit better now.

The database is populated/written at deploy-time. It is read-only in the browser. I wondered if the browser could write data, too.

@jlxw
Copy link
Owner

jlxw commented Jul 18, 2020

You would need to expose your own API to it to write data, handle its own authentication/security/etc

@jlxw jlxw closed this as completed Jul 23, 2020
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