This version of cow-blog is ported to Google App Engine and uses Datastore instead of Tokyo Cabinet.
A blog about this project running cowclj, can be found here: http://cowclj.appspot.com/
To setup your own blog you have to:
- change the application name at war/WEB-INF/application-war.xml
- lein compile
- appcfg.sh update war
Note: There was a problem with the appengine SDK version 1.3.3, with 1.3.4 it works fine.
by Brian Carper
Now featuring thread safety!
This is a complete rewrite of my blog engine written in Clojure using Compojure and Tokyo Cabinet. Previous versions of this code were terrible and you should not use them.
This is intended as a working proof-of-concept of a simple website using Compojure. This is a clean rewrite that's close (but not identical) to the code I have been using to run my blog for the past year.
You should NOT expect to unpack this code and fire it up and have it work. This code is meant largely as a learning tool or HOWTO for writing a web app in Clojure. You should read the code carefully and understand it. It's only ~700 lines of code and it shouldn't be hard to read through.
Some effort has been made to make this a bit secure but not much. Read and understand (and fix) this code before deploying it publicly. Use at your own risk.
- Post tags, categories, comments
- Add/edit posts via admin interface
Tokyo Cabinet. You must install the C library (compile it yourself, it's straightforward), then install the Java bindings. Then you have to tell Java where to find everything via
LD_LIBRARY_PATH. Follow the directions closely.
JQuery and some JQuery plugins (included in
Showdown JS Markdown library (included in
/deps); I have slightly edited showdown to include a few extra features and integrate better with my blog. Vanilla Showdown will likely not work.
These features are very simple to implement (like, one or two functions each) but I haven't bothered yet; they will show up in he next version.
- Better stylesheet.
- Editing comments, deleting posts/comments (you can do this from the REPL in the meantime)
- Spam filtering
- Tag cloud
Make sure Tokyo Cabinet, Showdown, Compojure, and all of the files in
/blog are on your $CLASSPATH.
blog/config.clj. Then run this in a REPL:
Visit http://localhost:8080 in a browser.
posts.db will be created to store your data. Start reading
server.clj to see what's what.
Bugs are a certainty.
For bug reports, feedback, or suggestions, please email me at email@example.com or open an issue on github.
October 22, 2009 - Rewrite from scratch. No more CRUD. Tokyo Cabinet. Removed cows.
April 12, 2009 - Updated to work on Compojure's bleeding-edge "ring" branch. Complete rewrite of the CRUD library. Overhauled mostly everything.
March 27, 2009 - Initial release.