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'));