aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugin/slidenotes/index.js
diff options
context:
space:
mode:
authorHakim El Hattab2012-07-09 21:30:54 -0400
committerHakim El Hattab2012-07-09 21:30:54 -0400
commit54f1fcf381dcf23e54f2b942268aa799969fa9ea (patch)
treef2af92b00479674f864dd1c1b60dfb655ca5b5e2 /plugin/slidenotes/index.js
parent21983c7b7fa434f083589ad80411a44fca4119e2 (diff)
slidenotes becomes speakernotes to match wording in readme
Diffstat (limited to 'plugin/slidenotes/index.js')
-rw-r--r--plugin/slidenotes/index.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/plugin/slidenotes/index.js b/plugin/slidenotes/index.js
deleted file mode 100644
index 1be941e..0000000
--- a/plugin/slidenotes/index.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var express = require('express');
-var fs = require('fs');
-var io = require('socket.io');
-var _ = require('underscore');
-var Mustache = require('mustache');
-
-var app = express.createServer();
-var staticDir = express.static;
-
-io = io.listen(app);
-
-var opts = {
- port : 1947,
- baseDir : __dirname + '/../../'
-};
-
-io.sockets.on('connection', function(socket) {
- socket.on('slidechanged', function(slideData) {
- socket.broadcast.emit('slidedata', slideData);
- });
-});
-
-app.configure(function() {
- [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) {
- app.use('/' + dir, staticDir(opts.baseDir + dir));
- });
-});
-
-app.get("/", function(req, res) {
- fs.createReadStream(opts.baseDir + '/index.html').pipe(res);
-});
-
-app.get("/notes/:socketId", function(req, res) {
-
- fs.readFile(opts.baseDir + 'plugin/slidenotes/notes.html', function(err, data) {
- res.send(Mustache.to_html(data.toString(), {
- socketId : req.params.socketId
- }));
- });
- // fs.createReadStream(opts.baseDir + 'slidenotes/notes.html').pipe(res);
-});
-
-// Actually listen
-app.listen(opts.port || null);
-
-var brown = '\033[33m',
- green = '\033[32m',
- reset = '\033[0m';
-
-var slidesLocation = "http://localhost" + ( opts.port ? ( ':' + opts.port ) : '' );
-
-console.log( brown + "reveal.js - Slide Notes" + reset );
-console.log( "1. Open the slides at " + green + slidesLocation + reset );
-console.log( "2. Click on the link your JS console to go to the notes page" );
-console.log( "3. Advance through your slides and your notes will advance automatically" );