Skip to content

Instantly share code, notes, and snippets.

@dviramontes
Created June 27, 2013 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dviramontes/5877343 to your computer and use it in GitHub Desktop.
Save dviramontes/5877343 to your computer and use it in GitHub Desktop.
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