Skip to content
Snippets Groups Projects
Commit e9c205c7 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

verification server now conforms to new file organization

parent 9919426a
No related branches found
No related tags found
No related merge requests found
const path = require('path'),
url = require('url'),
httputils = require('./httputils.js'),
idassertion = require('./idassertion.js'),
jwt = require('./jwt.js');
fs = require('fs'),
httputils = require('./lib/httputils.js'),
idassertion = require('./lib/idassertion.js'),
jwt = require('./lib/jwt.js');
// create the var directory if it doesn't exist
var VAR_DIR = path.join(__dirname, "var");
try { fs.mkdirSync(VAR_DIR, 0755); } catch(e) { }
function handler(req, resp, serveFile) {
// dispatch!
......@@ -68,6 +73,8 @@ function handler(req, resp, serveFile) {
}
};
exports.varDir = VAR_DIR;
exports.setup = function(app) {
app.use(handler);
};
File moved
File moved
File moved
File moved
File moved
#!/usr/bin/env node
var sys = require("sys"),
path = require("path"),
fs = require("fs"),
......@@ -9,7 +11,7 @@ var PRIMARY_PORT = 62800;
var handler = require("./app.js");
var app = express.createServer().use(express.logger({
stream: fs.createWriteStream(path.join(__dirname, "server.log"))
stream: fs.createWriteStream(path.join(handler.varDir, "server.log"))
}));
// let the specific server interact directly with the express server to register their middleware
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment