Permalink
Browse files

added node

  • Loading branch information...
1 parent 74d372a commit 151b61fadf12367189c710d7d6e8bd696c8811da @xjamundx committed Mar 2, 2012
View
@@ -0,0 +1 @@
+node_modules
View
@@ -1,12 +1,10 @@
-Words Vs. Zombies
-By Jamund Ferguson
-http://www.jamund.com/words/
-
-DESCRIPTION:
+# Words Vs. Zombies
Words with Friends meets Plants vs. Zombies.
-TODO:
+http://www.jamund.com/words/
+
+## TODO
- Move to Backbone.js view models
- Allow multiple players to play a game from one computer
@@ -16,4 +14,4 @@ TODO:
- Create a leaderboard
- Mobile Web
- Android
-- iOS Clients
+- iOS Clients
View
35 app.js
@@ -0,0 +1,35 @@
+
+/**
+ * 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(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);
+console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
View
@@ -0,0 +1,9 @@
+{
+ "name": "application-name"
+ , "version": "0.0.1"
+ , "private": true
+ , "dependencies": {
+ "express": "2.5.5"
+ , "ejs": "0.6.1"
+ }
+}
File renamed without changes.
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Words Vs. Zombies</title>
- <link rel="stylesheet" href="words.css">
+ <link rel="stylesheet" href="/css/words.css">
</head>
<body>
<div class="board">
@@ -16,7 +16,9 @@
<button class="recall">Re-call</button>
<button class="shuffle">Shuffle</button>
</div>
- <script src="jquery.min.js"></script>
- <script src="words.js"></script>
+ <script src="/js/jquery.min.js"></script>
+ <script src="/js/underscore.min.js"></script>
+ <script src="/js/backbone.min.js"></script>
+ <script src="/js/words.js"></script>
</body>
</html>
View

Large diffs are not rendered by default.

Oops, something went wrong.
File renamed without changes.

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

Oops, something went wrong.
File renamed without changes.
View
@@ -0,0 +1,8 @@
+
+/*
+ * GET home page.
+ */
+
+exports.index = function(req, res){
+ res.render('index', { title: 'Express' })
+};
View
@@ -0,0 +1,2 @@
+<h1><%= title %></h1>
+<p>Welcome to <%= title %></p>
View
@@ -0,0 +1,10 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <title><%= title %></title>
+ </head>
+ <link rel="stylesheet" href="/css/style.css">
+ <body>
+ <%- body %>
+ </body>
+</html>

0 comments on commit 151b61f

Please sign in to comment.