From 358419c8799052e9bf7c4ff1a0fc8bf888b2bd2b Mon Sep 17 00:00:00 2001 From: Levi Olson Date: Tue, 11 Feb 2020 08:34:06 -0600 Subject: [PATCH] adding some notes in app.js --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 0e7a4c7..4dfe868 100644 --- a/app.js +++ b/app.js @@ -18,6 +18,7 @@ app.get('/', (req, res) => { }) }) +// This is really really inefficient... this should be cached and built during a build. app.get('/posts', (req, res) => { const postDir = __dirname + '/posts' let files = fs.readdirSync(postDir, 'utf8') @@ -93,4 +94,4 @@ app.get('/posts/:post', (req, res) => { const port = 3000 app.listen(port, () => console.log('Example app listening on port ' + port + '!')) -module.exports = app \ No newline at end of file +module.exports = app