Permalink
Browse files

Cleaned up

  • Loading branch information...
1 parent e4c0ff5 commit f9cc5d78f218e94383a4ac5454ddfdc055d0cec0 semu committed Dec 17, 2011
Showing with 6 additions and 6 deletions.
  1. +5 −5 lib/kickstart.js
  2. +1 −1 package.json
View
@@ -2,7 +2,8 @@ var express = require("express");
var connect = require("connect");
var kickstart = {'conf' : {}, 'srv': {}};
-/* Compress generated less files */
+/* Compress generated less files
+ * Thanks to Matt Sain - http://stackoverflow.com/a/8379561/713518 */
var less;
express.compiler.compilers.less.compile = function (str, fn) {
if (!less) {
@@ -20,9 +21,9 @@ exports.withConfig = function(conf) {
kickstart.conf = conf;
kickstart.srv = express.createServer(
/* Optional: Use SSL certificate */
- /* { ca: fs.readFileSync(__dirname + '/cert/ca.pem').toString(),
- , key: fs.readFileSync(__dirname + '/cert/domain.key').toString(),
- , cert: fs.readFileSync(__dirname + '/cert/domain.crt').toString()}, */
+ /* { ca: fs.readFileSync(conf.path + '/cert/ca.pem').toString(),
+ , key: fs.readFileSync(conf.path + '/cert/domain.key').toString(),
+ , cert: fs.readFileSync(conf.path + '/cert/domain.crt').toString()}, */
/* Optional: Use global db connection handler */
/* function(req, res, next) { if (req.db === undefined) { req.db = db; } next(); } */);
@@ -34,7 +35,6 @@ exports.withConfig = function(conf) {
kickstart.srv.use(express.cookieParser());
kickstart.srv.use(express.session({ secret: conf.sessionSecret }));
kickstart.srv.use(express.logger(':method :url - :referrer'));
- kickstart.srv.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
kickstart.srv.use(express.compiler({ src:conf.path + '/public', enable: ['less'] }));
kickstart.srv.use(express.static(conf.path + '/public'));
kickstart.srv.use(express.bodyParser());
View
@@ -2,7 +2,7 @@
"author": "semu <c@semu.mp> (http://github.com/semu)",
"name": "kickstart",
"description": "Preconfigured Express environment with less and jade rendering. See http://github.com/semu/node-kickstart-example for usage.",
- "version": "0.0.2",
+ "version": "0.0.3",
"homepage": "https://github.com/semu/node-kickstart",
"contributors": [
{ "name": "Sebastian Müller", "email": "c@semu.mp" }],

0 comments on commit f9cc5d7

Please sign in to comment.