A small web application built for beginners that highlights essential web programming topics such as:
- The HTTP Request Response life cycle
- Ruby's Sinatra web application framework
- Fundamental patterns in computer programming (loops, branching, variables)
- Data persistence using a SQL database
- HTML templating and ERB
- Deploying an Application to Heroku
The following video tutorials are all based on the code in this repository being deployed into the Cloud9 integrated development environment.
Please use terminal commands as they are written and used in the screencasts.
Social Wall screencast will orient you on how to setup the code in the CLoud9 ide.
Steps to get this application running.
- Head to Cloud9 and signup for an account, verify the account via email.
- Create a new workspace and into that workspace, 'Clone From Url' https://github.com/codeunion/social-wall
- 'Start Editing' your new workspace
- Open a new terminal window, verify you are in your 'workspace' directory.
pwd
ls
![http://cl.ly/image/2x3O3J2E151U/Image%202014-09-05%20at%204.31.10%20PM.png](http://cl.ly/image/2x3O3J2E151U/Image%202014-09-05%20at%204.31.10%20PM.png)
- Install the application's gems.
bundle install --without production
- Run the application
ruby hello.rb -p $PORT -o $IP
- Visit your application on the internet.
https://social-wall-c9-codeunion.c9.io/
CodeUnion's Cloud9 username is 'codeunion' and therefore the above url is named accordingly. Make sure to use your own username, which will point to your running instance of the application.
Let's look at the relationship between the server-side ruby code we've written in hello.rb
and our available 'server endpoints' like /waffles
or /waffles/chocolate
by watching a screencast
Run the application inside the cloud9 ide.
ruby hello.rb -p $PORT -o $IP
Visit the root /
of your application, https://social-wall-c9-yourusername.c9.io/
and watch the screencast.
Watch the Screencast, explore the nature of visiting the 'root' of the application and creating Message records by making POST
requests to /messages
Run the application inside the cloud9 ide.
ruby app.rb -p $PORT -o $IP
- Make an account at heroku
- Open Social Wall in the Cloud9 IDE
- Watch the screencast, create a new heroku application and deploy your own Social Wall app.
heroku create
git push heroku master
heroku addons:add heroku-postgresql:hobby-dev
heroku domains
Visit your newly created application in a web browser.