Site hosting on Assembla.com
Here is an overview of how to setup a site on assembla.com, with RdbHost database hosting.
Create an Assembla Account:
This is very straightforward, following the prompts at assembla. You can create subversion and git accounts. Here we describe the subversion way.
Create a Directory in the Repository
Create a new directory in your repository for storing public files. You can name this directory as you like; this example uses a domain style name 'rdbhost.assembla.com'. Navigate to the new directory using the on-site repository browser.
Click the publish button and enter the chosen domain name, including subdomain as applicable.
We will assume sufficient familiarity with subversion to checkout the repository create the display directory, add new html content and commit all.
We have a tutorial on setting up domain pointers at GoDaddy, and the following is a screenshot of how one registrar handles zone editing, and RdbHost's domain configuration. This example also illustrates the recommended practice of creating a TXT record with your account number.
After you publish the subversion directory and update your dns, you should be able to access your static index.html at that domain. I read that several hours may be required to propogate dns records, but have personally observed propogation times of approx 5 minutes.
Register Domain on RdbHost Account
Add the chosen domain to your RdbHost account configuration at the /mbr/domain page.
Develop Your App
Develop your app in your 'example.assembla.com' folder, and periodically commit it to the assembla.com repository. You will be able to test it at the internet domain as well as on localhost.
We have a demonstration app, on a.rdbhost.com, called 'Three Faves'. This is the simplest database example app I could think of that might be fun. You enter 3 favorite things, and it looks for other people in the database that also entered any of those things, and shows you what else they entered. It is completely anonymous, and has a crowd-sourced bad-words filter.
The 'Three Faves' app uses the preauth role, which is only permitted to run white-listed queries, so the database is protected against somebody trying to run arbitrary destructive queries as that role.
The creation of tables, views, indexes, etc, can be incorporated into your app, but the Rdbadmin utility is useful for creating initial tables and such. Use SQL GRANT to grant necessary privileges to the chosen roles.
To summarize the main points:
- You can host static pages on www.assembla.com, under your own domain, and use RdbHost hosted databases from those static pages.
- Setup roles on RdbHost, and grant appropriate privileges to tables and other resources..
- Create tables and indexes using the RdbAdmin utility.
- Develop your application, clear the whitelist, repopulate with valid queries by testing every app feature, and you are done.