Created
March 28, 2019 04:25
-
-
Save senthilmpro/4245b9921e2ce0cf50a53578fca52e1c to your computer and use it in GitHub Desktop.
host local files serve-index
This file contains 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
var express = require('express'), | |
directory = require('serve-index'), | |
app = new express(); | |
var hourMs = 1000*60*60; | |
app.use(express.static(__dirname + '/public', { maxAge: hourMs })); | |
app.use(directory(__dirname + '/public', { 'view' : 'details'})); | |
app.listen(4433); | |
console.log("application running on : "+ 4433); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment