Skip to content
Browse files

Refactoring.

  • Loading branch information...
1 parent 8153c24 commit 652b47405ba1b68aa8ebd2878584b51cae58a4f3 @ewoudj committed
Showing with 15 additions and 7 deletions.
  1. +2 −0 app.js
  2. +1 −0 index.js
  3. +12 −7 private/server/http.js
View
2 app.js
@@ -1 +1,3 @@
+// Example server
+
var server = require('./private/server/http').createServer(3001, null);
View
1 index.js
@@ -17,6 +17,7 @@ exports.referenceControl = require('./public/controls/formreferencecontrol').con
exports.referenceListControl = require('./public/controls/formreferencelistcontrol').control;
exports.radioControl = require('./public/controls/formradiocontrol').control;
exports.application = require('./public/controls/application').application;
+exports.httpserver = require('./private/server/http');
exports.models = {
user: require('./public/models/user.js')
View
19 private/server/http.js
@@ -1,18 +1,23 @@
var connect = require('connect');
var form = require('connect-form');
-var middleware = require('./middleware');
var browserify = require( 'browserify' );
+var middleware = require('./middleware');
+var framework = require('./../..');
exports = module.exports = {
createServer : function(port, models){
var result = connect(
form({ keepExtensions: true }),
- connect.static(__dirname + '/static', { maxAge: 0 }),
- browserify({
- ignore : [__dirname + '/private/data/storage.js', 'mongodb', 'crypto', 'md5'],
- require : __dirname + '/index.js',
- mount : '/script.js'
- }),
+ connect.static(__dirname + '/../../static', { maxAge: 0 }),
+// browserify({
+// ignore : [
+// __dirname + '/../../private/data/storage.js',
+// __dirname + '/../../private/server/http.js',
+// __dirname + '/../../private/server/middleware.js',
+// 'mongodb', 'crypto', 'md5'],
+// require : __dirname + '/../../index.js',
+// mount : '/script.js'
+// }),
connect.query(),
connect.cookieParser(),
connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }}),

0 comments on commit 652b474

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