From bea486fd94a0f70730924b3f1a230b7568d07ee5 Mon Sep 17 00:00:00 2001 From: heycalmdown Date: Sat, 1 Dec 2018 17:00:09 +0900 Subject: [PATCH] fix: frontpage not shown --- src/app.ts | 5 ++++- src/routes/index.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app.ts b/src/app.ts index 4a1ef21e..cdcfca63 100644 --- a/src/app.ts +++ b/src/app.ts @@ -17,7 +17,10 @@ app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); -app.use(express.static(path.join(__dirname, '../node_modules/reveal.js'))); +app.use('/css', express.static(path.join(__dirname, '../node_modules/reveal.js/css'))); +app.use('/js', express.static(path.join(__dirname, '../node_modules/reveal.js/js'))); +app.use('/lib', express.static(path.join(__dirname, '../node_modules/reveal.js/lib'))); +app.use('/plugin', express.static(path.join(__dirname, '../node_modules/reveal.js/plugin'))); app.use('/', routes); app.use('/users', users); diff --git a/src/routes/index.ts b/src/routes/index.ts index a8abf43a..317d2d17 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -32,7 +32,7 @@ function pickSummary(page: Content): { id: string, title: string } { } /* GET home page. */ -router.get('/', (req, res, next) => { +router.get('/', (_req, res) => { const p = [ Promise.all(pinnedPages.map(id => confluency.getPage(id).then(pickSummary))), confluency.search('label=miniseminar').then(data => _.map(data, pickSummary))