3 ms·
I have a side project where I want to figure out how to host a database on github. If there was a javascript API for doing git business on github, then could ju
by zackzackzack 15y ago
I have a side project where I want to figure out how to host a database on github. If there was a javascript API for doing git business on github, then could just update the database to and fro. It would be messy of course but it wouldn't matter. Because you would have a dynamic app up on github for free (or 7/month if you wanted your secret sauce to stay secret).
- whichdan 15y agoJust speculating, but could you update an SQLite DB with JS and use an API to commit the change? Or would that be ineffective since the API keys would be publicly available? I'm assuming the db access would be infrequent, like a blog that used Disqus for comments.
- cmelbye 15y agoGitHub's API can do low-level modifications of git repositories. It probably supports JSONP.
- ericktai 15y agoNot sure if you meant having an HTML/JS app served from GitHub with database capabilities, but maybe you'd want to check out something like StackMob? (Disclaimer, I work at StackMob, but appearing here as a fellow developer) You can commit your HTML/JS files to GitHub and StackMob will serve those pages for you via the GitHub integration StackMob has. What that enables you to do is actually use StackMob's REST API for its backend services (datastore, versioning, custom server side code) via AJAX since there's no cross-domain AJAX problems (pages and ajax calls are going to/from your stackmob.com hosted pages) I use it to host my fiancee and I's wedding site and I use the datastore to hold guest information, people can register/login etc. The data is stored on Stackmob via the AJAX calls by using the JS SDK StackMob provides. Example javascript: var user = new StackMob.User({ username: 'asdf', password: 'asdf', acquaintance: 'bride', ...}); user.create(); //this fires off the ajax call to StackMob and saves your data in the datastore on that end. It's free at a certain usage level (I'd imagine your personal use would be within the free threshold) if you wanted to give it a go. https://www.stackmob.com/devcenter/docs/StackMob-Hosted-HTML5:-GitHub https://www.stackmob.com/devcenter/docs/StackMob-Hosted-HTML...