/**
 * Module dependencies.
 */

var express = require('express'),
	mysql = require('mysql'),
	mssql = require('mssql'),
	async = require('async'),
	passport = require('passport'),
	flash = require('connect-flash');

var port = process.env.PORT || 8080;
	config = require('./config');


/**
 * Module configuration.
 */

var app = express(),
	webapi = mysql.createConnection(config.mysql),
	mssql_conn = mssql.connect(config.mssql);


/**
 * Route cofiguration.
 */

app.get('/', function (req, res) {
	res.send('uopwebapi');
});


// Listen for connections.
app.listen(port, function () {
	console.log('Listening to port ' + port);
});
@@ -333,19 +333,60 @@
 xpress()
-,%0A%09
+;%0A// Setup connection to the databases.%0Avar 
 webapi =
@@ -464,24 +464,649 @@
 ig.mssql);%0A%0A
+// Set up the express application.%0Aapp.configure(function () %7B%0A%09// Log every request to the console.%0A%09app.use(express.logger('dev'));%0A%09// Read cookies needed for authentication.%0A%09app.use(express.cookieParser());%0A%09// Get information from HTML forms.%0A%09app.use(express.json());%0A%09app.use(express.urlencoded());%0A%09// Set up jade for templating.%0A%09app.set('view engine', 'jade');%0A%09// Session secret.%0A%09app.use(express.session(%7B secret: 'uopwebapi' %7D));%0A%09app.use(passport.initialize());%0A%09// Use persistent login sessions.%0A%09app.use(passport.session());%0A%09// Use connect-flash for flash messages stored in session.%0A%09app.use(flash());%0A%7D);%0A
 %0A/**%0A * Rout

Set up the express application.