Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

API init

  • Loading branch information...
commit ea37a70e1159e200ce1af071cbd73e1da64eb833 1 parent 3e27ae5
Alexander Hansson AlexxHansson authored
Showing with 20 additions and 1 deletion.
  1. +20 −1 api/app.js
21 api/app.js
View
@@ -1 +1,20 @@
-console.log('Be gone foul woman!');
+var app = require('express')();
+var server = require('http').createServer(app);
+var io = require('socket.io').listen(server);
+
+server.listen(8080);
+
+app.get('/', function (req, res) {
+ 'use strict';
+ //Serve application
+ res.sendfile(__dirname + '/gui/app/index.html');
+ console.log('Be gone foul woman!');
+});
+/*
+io.sockets.on('connection', function (socket) {
+ socket.emit('news', { hello: 'world' });
+ socket.on('my other event', function (data) {
+ console.log(data);
+ });
+});
+*/
Please sign in to comment.
Something went wrong with that request. Please try again.