From a6026a53d53d3c8b8a121a2c512162e0a147e802 Mon Sep 17 00:00:00 2001 From: Mike Luby Date: Sat, 25 Jul 2015 16:33:14 -0700 Subject: [PATCH] fix example --- example/.bowerrc | 3 +++ example/bower.json | 19 +++++++++++++++++++ example/{ => client}/index.html | 0 example/server.js | 5 +---- 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 example/.bowerrc create mode 100644 example/bower.json rename example/{ => client}/index.html (100%) diff --git a/example/.bowerrc b/example/.bowerrc new file mode 100644 index 0000000..263f69d --- /dev/null +++ b/example/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory" : "client/bower_components" +} diff --git a/example/bower.json b/example/bower.json new file mode 100644 index 0000000..0c4beef --- /dev/null +++ b/example/bower.json @@ -0,0 +1,19 @@ +{ + "name": "example", + "version": "1.0.0", + "homepage": "https://github.com/mLuby/grapevine", + "authors": [ + "Mike Luby " + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "grapevine-client": "~1.0.1" + } +} diff --git a/example/index.html b/example/client/index.html similarity index 100% rename from example/index.html rename to example/client/index.html diff --git a/example/server.js b/example/server.js index e1f8b8d..4f4c902 100644 --- a/example/server.js +++ b/example/server.js @@ -3,7 +3,6 @@ var app = express(); var server = app.listen(3000, function(){ console.log('Server listening at localhost:3000'); }); -var path = require('path'); var Grapevine = require('grapevine-server'); Grapevine.setup('/webrtc', app, server); @@ -13,6 +12,4 @@ app.get('/sendMessage', function(req, res){ return res.sendStatus(200); }); -app.get('/', function(req, res){ - return res.sendFile(path.join(__dirname + '/index.html')); -}); +app.use('/', express.static('client'));