diff --git a/config.coffee b/config.coffee new file mode 100644 index 0000000..f6d97de --- /dev/null +++ b/config.coffee @@ -0,0 +1,5 @@ +config = {} +config.port = 5984 +config.host = 'arvidkahl.iriscouch.com' +config.name = 'sessions' +module.exports = config \ No newline at end of file diff --git a/main.coffee b/main.coffee index 202582b..3fbca5f 100644 --- a/main.coffee +++ b/main.coffee @@ -6,6 +6,11 @@ less = require 'less' fs = require 'fs' md = require('node-markdown').Markdown auth = require 'auth' +config = require 'config' + +#session perstistence +connectCouchDB = require('connect-couchdb')(exp) + #auth.helpExpress app # App Configuration @@ -17,18 +22,13 @@ app.configure () -> app.use exp.methodOverride() app.use exp.bodyParser() app.use exp.cookieParser() - app.use exp.session {secret: 'nawollenwirdochmalsehn'} - app.use exp.static __dirname + '/public' - #app.use '/public/less' exp.static(__dirname + '/public/less') - + app.use exp.session {secret: 'nawollenwirdochmalsehn', store: new connectCouchDB({host: config.host,name: 'sessions', reapInterval: 600000, compactInterval: 300000})} + app.use exp.static __dirname + '/public' app.use auth.middleware() - -#exp.compiler.compilers.less.compile = (str, fn) => -# less.render str, { compress : true }, fn # Articler Class Articler = require('./articler').Articler -article = new Articler 'http://arvidkahl.iriscouch.com', 5984 +article = new Articler config.host, config.port app.get '/', (req, res) -> if (req.session.auth) diff --git a/package.json b/package.json new file mode 100644 index 0000000..7397cd6 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name" : "spark", + "description" : "picturing ideas", + "url" : "http://spark.nodester.com", + "keywords" : ["conceptart", "images", "stories", "fiction"], + "author" : "Arvid Kahl ", + "contributors" : [], + "version" : "0.1.0", + "directories" : { "public": "./public" }, + "engines" : { "node": ">=0.2.0" }, + "dependencies":{ + "coffee-script":"*", + "express":"*", + "jade":"*", + "everyauth":"*", + "couchdb":"*", + "node-markdown":"*", + "connect-couchdb":"*", + "less":"*", + "cradle":"*" + } +} \ No newline at end of file diff --git a/public/less/bootstrap.css b/public/less/bootstrap.css index 881c8c9..3cee89c 100644 --- a/public/less/bootstrap.css +++ b/public/less/bootstrap.css @@ -3683,3 +3683,6 @@ a.thumbnail:hover { body { padding-top: 60px; } +h1 { + color: green; +} diff --git a/public/less/utilities.less b/public/less/utilities.less index ed1023f..5d483b3 100755 --- a/public/less/utilities.less +++ b/public/less/utilities.less @@ -25,3 +25,7 @@ body { padding-top: 60px; } + +h1 { + color:blue; +} \ No newline at end of file diff --git a/views/index.jade b/views/index.jade index e2e2d51..5a90ca5 100644 --- a/views/index.jade +++ b/views/index.jade @@ -22,12 +22,22 @@ div.container div.span10 - each article in articles .article - h1= article.title + h2= article.title span.created= article.created_at span.body= article.body div.span2 h3 Secondary content footer - p © Company 2011 - - \ No newline at end of file + p © + a(href= "http://www.arvidkahl.de")="Arvid Kahl" + | . Website is built with + a(href= "http://nodejs.org")= "Node.js" + |, + a(href= "http://www.http://expressjs.com")="Express" + |, + a(href= "http://couchdb.apache.org/")="CouchDB" + |, + a(href= "http://lesscss.org/")="LESS" + | and + a(href= "http://coffeescript.org/")="Coffee-Script" + |.