From: Johannes Zellner Date: Wed, 1 Jul 2015 01:07:23 +0000 (+0200) Subject: Serve up the correct files X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=f4243403b79ae3afa917c51969c4b5a9db1a6cfa;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git Serve up the correct files --- diff --git a/app.js b/app.js index 7d5258f..d1619a0 100755 --- a/app.js +++ b/app.js @@ -34,7 +34,7 @@ router.get('/', function (req, res) { res.status(200).send(ejs.render(fs.readFil app.use(morgan('dev')); app.use(compression()); app.use('/settings', express.static(__dirname + '/app')); -app.use(express.static(__dirname + '/files')); +app.use(express.static(path.resolve(__dirname, process.argv[2] || 'files'))); app.use(bodyParser.json()); app.use(bodyParser.urlencoded()); app.use(cookieParser());