diff --git a/installit b/installit new file mode 100755 index 0000000..e67d30d --- /dev/null +++ b/installit @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# TODO: rewrite in node + +set -e + +current_dir=$(cd $(dirname $0) && pwd) +cd ${current_dir} + +mkdir -p ./public/lib/knockout +if [ ! -f ./public/lib/knockout/knockout.mapping-latest.js ]; then + cd ./public/lib/knockout + curl -O https://raw.github.com/SteveSanderson/knockout.mapping/master/build/output/knockout.mapping-latest.js + cd ${current_dir} +fi + + diff --git a/package.json b/package.json index daa6568..e84eba4 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "description": "README.md", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "install": "./installit" } } diff --git a/public/index.html b/public/index.html index b2aea6f..196abe0 100644 --- a/public/index.html +++ b/public/index.html @@ -29,7 +29,7 @@ Editing index
- mode: + mode:
@@ -60,6 +60,7 @@ + @@ -71,9 +72,9 @@ - - - + + + diff --git a/server.js b/server.js index dec9d0f..b4a745c 100644 --- a/server.js +++ b/server.js @@ -20,14 +20,19 @@ var config = { }, share: { sockjs: {}, + staticpath: '/lib/share', db: {type: 'none'} }, - public_path: __dirname + '/public' + public_path: __dirname + '/public', + markdown_client: __dirname + '/node_modules/markdown/lib', + ace_client: __dirname + '/node_modules/share/examples/lib/ace' }; var app = express(); config.debug && app.use(connect.logger()); app.use(express.static(config.public_path)); +app.use('/lib/markdown', express.static(config.markdown_client)); +app.use('/lib/ace', express.static(config.ace_client)); var server = instance(app, config);