Permalink
Browse files

First commit

  • Loading branch information...
0 parents commit 20485345b060e57adc8e29b0a9e602be44f782e6 @matzipan committed Mar 29, 2012
Showing 409 changed files with 47,189 additions and 0 deletions.
49 app.js
@@ -0,0 +1,49 @@
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express');
+var routes = require('./routes');
+var socketio = require('socket.io');
+require("./logic/control.js");
+
+console.log("Creating Express server")
+var app = module.exports = express.createServer();
+console.log("Binding socket.io to Express");
+var io = socketio.listen(app);
+
+
+// Configuration
+
+app.configure(function(){
+ app.set('views', __dirname + '/views');
+ app.set('views', __dirname + '/views');
+ app.set('view engine', 'ejs');
+ app.set('view options', {sitename : "Webchat Atestat"});
+ app.use(express.bodyParser());
+ app.use(express.methodOverride());
+ app.use(app.router);
+ app.use(express.static(__dirname + '/public'));
+});
+
+app.configure('development', function(){
+ app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
+});
+
+app.configure('production', function(){
+ app.use(express.errorHandler());
+});
+
+// Routes
+
+app.get('/', routes.index);
+app.get('/main', routes.main);
+
+console.log("Starting up Express");
+app.listen(8080);
+console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
+
+io.sockets.on('connection', function(socket) {
+ new logic(socket);
+});
@@ -0,0 +1,8 @@
+{
+ "folders":
+ [
+ {
+ "path": "/home/matzipan/Workspace/Atestat"
+ }
+ ]
+}
Oops, something went wrong.

0 comments on commit 2048534

Please sign in to comment.