summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2012-10-25 16:25:00 -0700
committerJohn McLear <john@mclear.co.uk>2012-10-25 16:25:00 -0700
commitd5ace6c163ae6ec3789027c5301ae90beeb1f229 (patch)
treec90df45b5bf3ddb210405733234909d5be8f4746 /src
parenta80eb93f7516757368ac6932a28de4dc58b37ba7 (diff)
parent399080ad739646d54913c1bf1afbb438d9785c08 (diff)
downloadetherpad-lite-d5ace6c163ae6ec3789027c5301ae90beeb1f229.zip
Merge pull request #1091 from kingkaeru/feature/iisnode_support
Feature/iisnode support
Diffstat (limited to 'src')
-rw-r--r--src/node/utils/Settings.js2
-rw-r--r--src/web.config32
2 files changed, 33 insertions, 1 deletions
diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js
index dd34ac5e..3d7894d5 100644
--- a/src/node/utils/Settings.js
+++ b/src/node/utils/Settings.js
@@ -37,7 +37,7 @@ exports.ip = "0.0.0.0";
/**
* The Port ep-lite should listen to
*/
-exports.port = 9001;
+exports.port = process.env.PORT || 9001;
/*
* The Type of the database
*/
diff --git a/src/web.config b/src/web.config
new file mode 100644
index 00000000..e057b919
--- /dev/null
+++ b/src/web.config
@@ -0,0 +1,32 @@
+<configuration>
+ <system.webServer>
+
+ <handlers>
+ <add name="iisnode" path="node_modules/ep_etherpad-lite/node/server.js" verb="*" modules="iisnode" />
+ </handlers>
+
+ <rewrite>
+ <rules>
+ <!-- uncomment this section to enable debugging
+ <rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
+ <match url="iisnode"/>
+ <action type="Rewrite" url="node_modules/ep_etherpad-lite/node/iisnode" />
+ </rule>
+ <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
+ <match url="^server.js\/debug[\/]?" />
+ </rule>
+ -->
+ <rule name="StaticContent">
+ <action type="Rewrite" url="public{{REQUEST_URI}}"/>
+ </rule>
+ <rule name="DynamicContent">
+ <conditions>
+ <add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>
+ </conditions>
+ <action type="Rewrite" url="node_modules/ep_etherpad-lite/node/server.js" />
+ </rule>
+ </rules>
+ </rewrite>
+
+ </system.webServer>
+</configuration>