Skip to content

Commit

Permalink
Fixes issue #33
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Jul 21, 2023
1 parent 1469595 commit b1b31ca
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ const Number = require("./number");
const pandoc = require("./pandoc");
const http = require("http");
const { execSync } = require("child_process");
const path = require("path");

const livereload = require("livereload");
const liveReloadServer = livereload.createServer({ extraExts: ["md"] });
liveReloadServer.watch(path.join(__dirname, ".."));

const connectLivereload = require("connect-livereload");

var app = express()
.use(connectLivereload())
.use(express.static(__dirname + "/../docs"))
.get("/*", function (req, res, next) {
if (req.path.endsWith("/")) {
Expand Down
64 changes: 64 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
"js-yaml": "^4.1.0",
"mocha": "^10.2.0",
"puppeteer": "^20.7.4"
},
"devDependencies": {
"connect-livereload": "^0.6.1",
"livereload": "^0.9.3"
}
}

0 comments on commit b1b31ca

Please sign in to comment.