From 29d73bfc8dceb8cb82973d4e59f625ec8ab858e7 Mon Sep 17 00:00:00 2001 From: jkaplon Date: Thu, 18 Feb 2016 17:34:25 -0500 Subject: [PATCH] Move code mirror dirs into dedicated code mirror folder, ignore it, and have node serve it statically. --- .gitignore | 4 +--- server.js | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 16c862a..b834af7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -/keymap/* -/lib/* -/mode/* +/codemirror/* /note-data/* index.html /logs/* diff --git a/server.js b/server.js index 3105ad0..3620cc4 100644 --- a/server.js +++ b/server.js @@ -15,9 +15,10 @@ app.engine('hbs', hbs.express4({ })); app.set('view engine', 'hbs'); app.set('views', __dirname + '/views'); -app.use('/lib', express.static('lib')); // these 3 seem hacky, but doing it here instead of view. -app.use('/keymap', express.static('keymap')); -app.use('/mode', express.static('mode')); +//app.use('/lib', express.static('lib')); // these 3 seem hacky, but doing it here instead of view. +//app.use('/keymap', express.static('keymap')); +//app.use('/mode', express.static('mode')); +app.use(express.static('codemirror')); var notePath = __dirname + '/note-data/allNotes.txt';