Permalink
Browse files

serve e2e test runner

  • Loading branch information...
1 parent 065bdf4 commit cf150c97e47415121dcedf89beaf26df01f76c1d @vojtajina vojtajina committed Nov 26, 2012
Showing with 7 additions and 2 deletions.
  1. +5 −1 server/index.js
  2. +2 −1 server/start.js
View
@@ -22,7 +22,7 @@ var removeMenuItems = function(restaurant) {
};
-exports.start = function(PORT, STATIC_DIR, DATA_FILE) {
+exports.start = function(PORT, STATIC_DIR, DATA_FILE, TEST_DIR) {
var app = express();
var storage = new MemoryStorage();
@@ -99,6 +99,10 @@ exports.start = function(PORT, STATIC_DIR, DATA_FILE) {
});
+ // only for running e2e tests
+ app.use('/test/', express.static(TEST_DIR));
+
+
// start the server
// read the data from json and start the server
fs.readFile(DATA_FILE, function(err, data) {
View
@@ -1,5 +1,6 @@
var PORT = process.argv[2] && parseInt(process.argv[2], 10) || 3000;
var STATIC_DIR = __dirname + '/../app';
+var TEST_DIR = __dirname + '/../test';
var DATA_FILE = __dirname + '/data/restaurants.json';
-require('./index').start(PORT, STATIC_DIR, DATA_FILE);
+require('./index').start(PORT, STATIC_DIR, DATA_FILE, TEST_DIR);

0 comments on commit cf150c9

Please sign in to comment.