Skip to content

Instantly share code, notes, and snippets.

@akbarsahata
Created May 2, 2018 04:50
Show Gist options
  • Save akbarsahata/eff02fd9e1378e2f7d127a5b9db58c23 to your computer and use it in GitHub Desktop.
Save akbarsahata/eff02fd9e1378e2f7d127a5b9db58c23 to your computer and use it in GitHub Desktop.
static folder middleware on Express.js
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