diff options
author | Mateja <mail@matejamaric.com> | 2021-05-02 21:06:06 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-05-02 21:06:06 +0200 |
commit | 7483bb5da6b22b94045a309d2ece2ed80ce48dc2 (patch) | |
tree | 2bcdb9c0e395ab967302fc1409b205f75b0a4f13 /index.js | |
parent | 4320439bb76922c13917845a2dcb17a84fc493d2 (diff) | |
download | node-playground-7483bb5da6b22b94045a309d2ece2ed80ce48dc2.tar.gz node-playground-7483bb5da6b22b94045a309d2ece2ed80ce48dc2.zip |
Add `public` directory for static files.
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -6,6 +6,8 @@ const app = express(); app.engine('handlebars', exphbs()); app.set('view engine', 'handlebars'); +app.use(express.static('public')); + app.get('/', (req, res) => { res.render('home', { title: 'Home Page', |