Permalink
Browse files

Initial commit.

  • Loading branch information...
0 parents commit 27a9b248b39e3f636554a7b1cd74906489abcc28 @primaryobjects committed Sep 10, 2012
@@ -0,0 +1 @@
+node_modules
@@ -0,0 +1 @@
+web: node app.js
37 app.js
@@ -0,0 +1,37 @@
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , routes = require('./routes')
+ , user = require('./routes/user')
+ , http = require('http')
+ , path = require('path');
+
+var app = express();
+
+app.configure(function(){
+ app.set('port', process.env.PORT || 3000);
+ app.set('views', __dirname + '/views');
+ app.set('view engine', 'jade');
+ app.use(express.favicon());
+ app.use(express.logger('dev'));
+ app.use(express.bodyParser());
+ app.use(express.methodOverride());
+ app.use(app.router);
+ app.use(require('stylus').middleware(__dirname + '/public'));
+ app.use(express.static(path.join(__dirname, 'public')));
+});
+
+app.configure('development', function(){
+ app.use(express.errorHandler());
+ app.locals.pretty = true;
+});
+
+app.get('/', routes.index);
+app.get('/users', user.list);
+
+http.createServer(app).listen(app.get('port'), function(){
+ console.log("Express server listening on port " + app.get('port'));
+});
@@ -0,0 +1,13 @@
+{
+ "name": "application-name",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "start": "node app"
+ },
+ "dependencies": {
+ "express": "3.0.0rc4",
+ "jade": "*",
+ "stylus": "*"
+ }
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
No changes.
No changes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,8 @@
+
+/*
+ * GET home page.
+ */
+
+exports.index = function(req, res){
+ res.render('index', { title: 'Express' });
+};
@@ -0,0 +1,8 @@
+
+/*
+ * GET users listing.
+ */
+
+exports.list = function(req, res){
+ res.send("respond with a resource");
+};
No changes.
@@ -0,0 +1,20 @@
+div.navbar.navbar-inverse.navbar-fixed-top
+ div.navbar-inner
+ div.container
+ a.btn.btn-navbar(data-toggle="collapse", data-target=".nav-collapse")
+ span.icon-bar
+ span.icon-bar
+ span.icon-bar
+ a.brand(href="#")
+ | Program Name
+ div.nav-collapse.collapse
+ ul.nav
+ li.active
+ a(href="#")
+ | Home
+ li
+ a(href="#about")
+ | About
+ li
+ a(href="#contact")
+ | Contact
@@ -0,0 +1,6 @@
+extends layout
+
+block content
+ div.container
+ h1 Program Name
+ p Hello World
@@ -0,0 +1,19 @@
+!!!
+html
+ head
+ block head
+ title= title
+ link(rel='stylesheet', href='/css/bootstrap.min.css')
+ | <style>
+ | body { padding-top: 60px; }
+ | </style>
+ link(rel='stylesheet', href='/css/bootstrap-responsive.min.css')
+ link(rel='stylesheet', href='/css/style.css')
+ script(src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js')
+ script(src='/scripts/bootstrap.min.js')
+ body
+ include header
+
+ block content
+
+ include footer

0 comments on commit 27a9b24

Please sign in to comment.