From 7c494a42f0069e4e2d8ee2ffd4cba95cd1f8d887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2EFernando=20S=C3=A1nchez?= Date: Sun, 7 Oct 2012 14:26:16 +0200 Subject: [PATCH] Changed process.env.PWD to __dirname --- player.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/player.js b/player.js index d931f81..279b6d9 100644 --- a/player.js +++ b/player.js @@ -1,9 +1,6 @@ /** * Module dependencies. */ - -process.env.PWD = process.cwd() - var express = require('express') , $ = require('jquery') , http = require('http') @@ -15,10 +12,10 @@ var port = process.env.PORT || 8888; var parser = new xml2js.Parser(); -app.use("/css", express.static(process.env.PWD + '/css')); -app.use("/", express.static(process.env.PWD + '/public')); -app.use("/js", express.static(process.env.PWD + '/js')); -app.use("/skin", express.static(process.env.PWD + '/skin')); +app.use("/css", express.static(__dirname + '/css')); +app.use("/", express.static(__dirname + '/public')); +app.use("/js", express.static(__dirname + '/js')); +app.use("/skin", express.static(__dirname + '/skin')); app.get('/', function(req,res){ res.sendfile("public/index.html");