Skip to content

Instantly share code, notes, and snippets.

@jasenmichael
Last active March 1, 2018 04:20
Show Gist options
  • Save jasenmichael/6a0b7d03d38f67c772f1e15a073e0645 to your computer and use it in GitHub Desktop.
Save jasenmichael/6a0b7d03d38f67c772f1e15a073e0645 to your computer and use it in GitHub Desktop.

Serve a directory with express

An simple way to host the client in a separate directory using node express
var path = require('path')

var express = require('express')

var app = express()

app.use(express.static(path.join(__dirname, '../client')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment