Skip to content

Wilfred/blog-comments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

a simple blog comments system in Clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published