Created
May 2, 2018 04:50
-
-
Save akbarsahata/eff02fd9e1378e2f7d127a5b9db58c23 to your computer and use it in GitHub Desktop.
static folder middleware on Express.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const path = require('path') | |
const app = express() | |
// set static folder | |
app.use(express.static(path.join(__dirname, 'public') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment