Add support for datasets

Not quite happy with the layout of these dataset items as they become to
wide with the hash in the description area.

Also the README.md seems to have changed order but changes were never
commited.

Also includes a fix to be able to run dev server on any port with the
`PORT` environment variable.

License: MIT
Signed-off-by: Victor Bjelkholm <git@victor.earth>
This commit is contained in:
victorbjelkholm 2018-07-30 15:51:03 +02:00
parent e10ee74b87
commit b2d4bb707c
No known key found for this signature in database
GPG key ID: 2C7BE98EF82CECB6
5 changed files with 52 additions and 12 deletions

View file

@ -46,7 +46,8 @@ async function run () {
autoIndex: true
})
http.createServer(ecstatic).listen(8080)
const port = process.env.PORT || 8080
http.createServer(ecstatic).listen(port)
const watcher = chokidar.watch([dataFolder, srcFolder], {
ignored: (string) => string.indexOf('src/content') !== -1 ||
@ -62,7 +63,7 @@ async function run () {
})
watcher
.on('ready', () => console.log('Listening on :8080'))
.on('ready', () => console.log('Listening on :' + port))
.on('add', handler)
.on('change', handler)
.on('unlink', handler)