Commit 620b1e49 authored by Leo Iannacone's avatar Leo Iannacone

added base from `express -t ejs -c stylus debomatic-webui`

parent 565110c4
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes');
var app = module.exports = express.createServer();
// Configuration
app.configure(function(){
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(require('stylus').middleware({ src: __dirname + '/public' }));
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});
app.configure('development', function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});
app.configure('production', function(){
app.use(express.errorHandler());
});
// Routes
app.get('/', routes.index);
app.listen(3000, function(){
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
});
{
"name": "debomatic-webui"
, "version": "0.0.1"
, "private": true
, "dependencies": {
"express": "2.5.8"
, "stylus": ">= 0.0.1"
, "ejs": ">= 0.0.1"
}
}
body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}
a {
color: #00b7ff;
}
body
padding: 50px
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif
a
color: #00B7FF
\ No newline at end of file
/*
* GET home page.
*/
exports.index = function(req, res){
res.render('index', { title: 'Express' })
};
\ No newline at end of file
<h1><%= title %></h1>
<p>Welcome to <%= title %></p>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<%- body %>
</body>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment