Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcljx committed May 2, 2013
0 parents commit f44da38
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
*.log
Empty file added assets/css/style.less
Empty file.
Empty file added assets/js/script.coffee
Empty file.
7 changes: 7 additions & 0 deletions boot.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PORT = Number(process.env.PORT ? 8081)

app = require './lib/app'

server = require('http').createServer app
if isNaN(PORT) then server.listen() else server.listen PORT
console.log "Server running on :#{server.address().port} in #{app.settings.env} mode"
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('coffee-script');
require('./boot');
18 changes: 18 additions & 0 deletions lib/app.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
express = require 'express'
module.exports = app = express()

ROOT = "#{__dirname}/.."

app.configure ->
app.set "views", "#{ROOT}/views"
app.set "view engine", "jade"

app.use express.methodOverride()
app.use express.static("#{ROOT}/public")

app.use express.bodyParser()
app.use app.router

app.use require('connect-assets')()

app.get '/', (req, res) -> res.render 'index'
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "ui-prototype-may",
"version": "0.0.0",
"description": "ERROR: No README.md file found!",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
},
"repository": "",
"author": "",
"license": "Proprietary",
"dependencies": {
"express": "~3.2.1",
"coffee-script": "~1.6.2",
"less": "~1.3.3",
"connect-assets": "~2.4.2",
"jade": "~0.30.0"
}
}
Empty file added public/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions views/index.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends layout

block body
h1 UI Prototype
9 changes: 9 additions & 0 deletions views/layout.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
!!!
html
head
title UI Prototype
!= css('style')
!= js('script')

body
block body

0 comments on commit f44da38

Please sign in to comment.