blog-comments

Created: 2011-07-10 23:47
Updated: 2013-09-30 22:50

README.md

blog-comments

A simple blog comments tool. Basic and friendly, based on Heroku's tutorial.

Usage

Running:

  1. Set database environment variable: $ export DATABASE_URL=postgresql://localhost:5432/shouter

  2. Install dependencies: $ lein deps

  3. If the table isn't yet set up: $ lein run -m blog-comments.models.migration

  4. Start the REPL: $ lein repl

  5. Enter the following:

    user=> (require 'blog-comments.core) nil user=> (use 'ring.util.serve) nil user=> (serve blog-comments.core/application) Started web server on port 3000 nil

When you want to reload your code:

user=> (require :reload-all 'blog-comments.core)
nil

Deployment

blog-comments is designed to run on Heroku. For the first deploy, do the following:

  1. Create the app on heroku: $ heroku create --stack cedar
  2. Add a shared database to the app: $ heroku addons:add shared-database
  3. Deploy the code: $ git push heroku master
  4. Create the database table: $ heroku run lein run -m blog-comments.models.migration
  5. Start the web process: $ heroku scale web=1
  6. Admire in the browser: $ heroku open

License

Copyright (C) 2011 Wilfred Hughes

Distributed under the Eclipse Public License, the same as Clojure.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more