Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git diff on server/
diff --git a/server/package.json b/server/package.json
index e8da09d..37ff4ef 100644
--- a/server/package.json
+++ b/server/package.json
@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "grunt",
- "start": "node app/app.js"
+ "start": "node app.js"
},
"keywords": [
"mongodb",
@@ -27,8 +27,8 @@
"mongojs": "~0.7.8",
"jslint": "~0.1.9",
"grunt-jslint": "~0.2.6",
- "grunt-coffeelint": "0.0.6"
- ,
- "grunt-cli": "~0.1.9"
+ "grunt-coffeelint": "0.0.6",
+ "grunt-cli": "~0.1.9",
+ "bson": "~0.1.9"
}
}
diff --git a/server/src/app.coffee b/server/src/app.coffee
deleted file mode 100644
index 208195f..0000000
--- a/server/src/app.coffee
+++ /dev/null
@@ -1,35 +0,0 @@
-# Use more descriptive alias.
-application_root= __dirname
-
-# Required libraries.
-express = require("express")
-path = require("path")
-
-# Create web server.
-app = express()
-
-# Connect to the mongo database.
-databaseUrl = "sampledb"
-collections = [ "things" ]
-db = require( "mongojs" ).connect(databaseUrl, collections)
-
-# Configure express app.
-app.configure( () ->
- app.use( express.bodyParser() )
- app.use( express.methodOverride() )
- app.use( app.router )
- app.use( express.static( path.join( application_root, "public" ) ) )
- return app.use( express.errorHandler( {
- dumpExceptions: true
- ,
- showStack: true
- } ) )
-)
-
-# Make REST web service available.
-app.get( '/api', (req, res) ->
- return res.send( 'Our Sample API is up...' )
-)
-
-# Open connection door way.
-app.listen( 1212 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment