Skip to content
Browse files

Added npm packaging

  • Loading branch information...
1 parent 1770bc8 commit a4c584a1cbbf34103554d4f7ca9db092eaaa82a3 @tdegrunt committed
Showing with 28 additions and 3 deletions.
  1. +11 −0 bin/mongodb-rest
  2. +14 −0 package.json
  3. +3 −3 server.js
View
11 bin/mongodb-rest
@@ -0,0 +1,11 @@
+#!/usr/bin/env node
+/**
+ * Module dependencies.
+ */
+
+var sys = require('sys'),
+ fs = require('fs'),
+ mongodbrest = require('../server');
+
+
+
View
14 package.json
@@ -0,0 +1,14 @@
+{
+ "name": "mongodb-rest",
+ "description": "REST API Server for MongoDB",
+ "version": "0.6.1",
+ "author": "Tom de Grunt <tom@degrunt.nl>",
+ "contributors": [
+ { "name": "Tom de Grunt", "email": "tom@degrunt.nl" },
+ ],
+ "dependencies": { "express": ">= 1.0.0rc3", "mongodb": ">= 0.7.9" },
+ "keywords": ["mongodb", "mongo", "db", "web", "rest", "restful"],
+ "directories": { "lib": "./lib" },
+ "bin": { "mongodb-rest": "./bin/mongodb-rest" },
+ "engines": { "node": ">= 0.2.0" }
+}
View
6 server.js
@@ -27,9 +27,9 @@ var app = module.exports.app = express.createServer();
app.configure(function(){
app.use(express.bodyDecoder());
- app.use(express.staticProvider(__dirname + '/public'));
+ app.use(express.staticProvider(__dirname + '/lib/public'));
app.use(express.logger());
- app.set('views', __dirname + '/views');
+ app.set('views', __dirname + '/lib/views');
app.set('view engine', 'jade');
});
@@ -45,6 +45,6 @@ require('./lib/main');
require('./lib/command');
require('./lib/rest');
-if(process.argv[0] == "node") {
+if(process.argv[0] != "expresso") {
app.listen(config.server.port, config.server.address);
}

0 comments on commit a4c584a

Please sign in to comment.
Something went wrong with that request. Please try again.