rename node.config to iisnode.yml

This commit is contained in:
Tomasz Janczuk 2012-05-10 10:19:02 -07:00
Родитель e9859dacaa
Коммит c779fb8265
20 изменённых файлов: 51 добавлений и 51 удалений

Просмотреть файл

@ -50,9 +50,9 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
<attribute name="appendToExistingLog" type="bool" defaultValue="false"/>
<attribute name="devErrorsEnabled" type="bool" defaultValue="true"/>
<attribute name="flushResponse" type="bool" defaultValue="false"/>
<attribute name="watchedFiles" type="string" defaultValue="*.js;node.config"/>
<attribute name="watchedFiles" type="string" defaultValue="*.js;iisnode.yml"/>
<attribute name="enableXFF" type="bool" defaultValue="false"/>
<attribute name="promoteServerVars" type="string" defaultValue=""/>
<attribute name="configOverrides" type="string" defaultValue="node.config"/>
<attribute name="configOverrides" type="string" defaultValue="iisnode.yml"/>
</sectionSchema>
</configSchema>

Просмотреть файл

@ -50,9 +50,9 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
<attribute name="appendToExistingLog" type="bool" defaultValue="false"/>
<attribute name="devErrorsEnabled" type="bool" defaultValue="true"/>
<attribute name="flushResponse" type="bool" defaultValue="false"/>
<attribute name="watchedFiles" type="string" defaultValue="*.js;node.config"/>
<attribute name="watchedFiles" type="string" defaultValue="*.js;iisnode.yml"/>
<attribute name="enableXFF" type="bool" defaultValue="false"/>
<attribute name="promoteServerVars" type="string" defaultValue=""/>
<attribute name="configOverrides" type="string" defaultValue="node.config"/>
<attribute name="configOverrides" type="string" defaultValue="iisnode.yml"/>
</sectionSchema>
</configSchema>

Просмотреть файл

@ -555,7 +555,7 @@ BOOL CFileWatcher::ScanDirectory(WatchedDirectory* directory, BOOL unc)
{
if (file->yamlConfig)
{
// the node.config file has changed
// the iisnode.yml file has changed
// invalidate the configuration such that on next message it will be re-created
CModuleConfiguration::Invalidate();

Просмотреть файл

@ -74,9 +74,9 @@ BOOL CProtocolBridge::SendIisnodeError(IHttpContext* httpCtx, HRESULT hr)
"OK",
hr,
TRUE,
"iisnode was unable to read the configuration file node.config. Make sure the node.config file syntax is correct. For reference, check "
" <a href=""https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/node.config"">"
"the sample node.config file</a>. The property names recognized in the node.config file of your version of iisnode are stored in the "
"iisnode was unable to read the configuration file iisnode.yml. Make sure the iisnode.yml file syntax is correct. For reference, check "
" <a href=""https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/iisnode.yml"">"
"the sample iisnode.yml file</a>. The property names recognized in the iisnode.yml file of your version of iisnode are stored in the "
"%systemroot%\\system32\\inetsrv\\config\\schema\\iisnode_schema.xml file.");
break;
};

Просмотреть файл

@ -320,7 +320,7 @@ copy /y $(ProjectDir)\..\config\* $(ProjectDir)\..\..\build\$(Configuration)\$(P
<None Include="..\..\test\functional\www\123_upload\hello.js" />
<None Include="..\..\test\functional\www\123_upload\web.config" />
<None Include="..\..\test\functional\www\124_node_config_override\hello.js" />
<None Include="..\..\test\functional\www\124_node_config_override\node.config" />
<None Include="..\..\test\functional\www\124_node_config_override\iisnode.yml" />
<None Include="..\..\test\functional\www\124_node_config_override\web.config" />
<None Include="..\..\test\functional\www\125_node_config_autoupdate\.gitignore" />
<None Include="..\..\test\functional\www\125_node_config_autoupdate\hello.js" />
@ -338,7 +338,7 @@ copy /y $(ProjectDir)\..\config\* $(ProjectDir)\..\..\build\$(Configuration)\$(P
<None Include="..\config\iisnode_schema.xml" />
<None Include="..\config\iisnode_schema_x64.xml" />
<None Include="..\samples\configuration\hello.js" />
<None Include="..\samples\configuration\node.config" />
<None Include="..\samples\configuration\iisnode.yml" />
<None Include="..\samples\configuration\readme.htm">
<DeploymentContent>true</DeploymentContent>
</None>

Просмотреть файл

@ -609,15 +609,9 @@
<None Include="..\..\test\functional\tests\123_upload.js">
<Filter>Tests\functional\tests</Filter>
</None>
<None Include="..\samples\configuration\node.config">
<Filter>Samples\configuration</Filter>
</None>
<None Include="..\..\test\functional\www\124_node_config_override\hello.js">
<Filter>Tests\functional\www\124_node_config_override</Filter>
</None>
<None Include="..\..\test\functional\www\124_node_config_override\node.config">
<Filter>Tests\functional\www\124_node_config_override</Filter>
</None>
<None Include="..\..\test\functional\www\124_node_config_override\web.config">
<Filter>Tests\functional\www\124_node_config_override</Filter>
</None>
@ -648,6 +642,12 @@
<None Include="..\..\test\functional\tests\126_node_config_syntax.js">
<Filter>Tests\functional\tests</Filter>
</None>
<None Include="..\samples\configuration\iisnode.yml">
<Filter>Samples\configuration</Filter>
</None>
<None Include="..\..\test\functional\www\124_node_config_override\iisnode.yml">
<Filter>Tests\functional\www\124_node_config_override</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="iisnode.rc" />

Просмотреть файл

@ -1,4 +1,4 @@
# The optional node.config file provides overrides of the iisnode configuration settings specified in web.config.
# The optional iisnode.yml file provides overrides of the iisnode configuration settings specified in web.config.
# node_env - determines the environment (production, development, staging, ...) in which
# child node processes run; if nonempty, is propagated to the child node processes as their NODE_ENV
@ -59,7 +59,7 @@ maxRequestBufferSize: 65536
# each entry consists of an optional directory name plus required file name which are relative to the directory where the main application entry point
# is located; wild cards are allowed in the file name portion only; for example: "*.js;node_modules\foo\lib\options.json;app_data\*.config.json"
watchedFiles: *.js;node.config
watchedFiles: *.js;iisnode.yml
# uncFileChangesPollingInterval - applications are recycled when the underlying *.js file is modified; if the file resides
# on a UNC share, the only reliable way to detect such modifications is to periodically poll for them; this setting

Просмотреть файл

@ -13,7 +13,7 @@
configuration</h2>
<p>
There are several configuration options that can be controlled from the system.webServer/iisnode
section of the web.config configuration file or the node.config file. Review web.config or node.config below for detailed description
section of the web.config configuration file or the iisnode.yml file. Review web.config or iisnode.yml below for detailed description
of them.</p>
visit the node.js endpoint at <a href="hello.js">hello.js</a><br />
visit the logs at <a href="hello.js.logs/0.txt">logs</a> (only available after you
@ -134,7 +134,7 @@ console.log('Application started at location ' + process.env.PORT);</pre>
* configOverrides - optional file name containing overrides of configuration settings of the iisnode section of web.config;
the format of the file is a small subset of YAML: each setting is represented as a &lt;key&gt;: &lt;value&gt; on a separate line
and comments start with # until the end of the line, e.g.
# This is a sample node.config file
# This is a sample iisnode.yml file
nodeProcessCountPerApplication: 2
maxRequestBufferSize: 8192 # increasing from the default
# maxConcurrentRequestsPerProcess: 512 - commented out setting
@ -182,8 +182,8 @@ console.log('Application started at location ' + process.env.PORT);</pre>
&lt;/system.webServer&gt;
&lt;/configuration&gt;</pre>
<p>
<b>node.config</b></p>
<pre># The optional node.config file provides overrides of the iisnode configuration settings specified in web.config.
<b>iisnode.yml</b></p>
<pre># The optional iisnode.yml file provides overrides of the iisnode configuration settings specified in web.config.
# node_env - determines the environment (production, development, staging, ...) in which
# child node processes run; if nonempty, is propagated to the child node processes as their NODE_ENV
@ -244,7 +244,7 @@ maxRequestBufferSize: 65536
# each entry consists of an optional directory name plus required file name which are relative to the directory where the main application entry point
# is located; wild cards are allowed in the file name portion only; for example: "*.js;node_modules\foo\lib\options.json;app_data\*.config.json"
watchedFiles: *.js;node.config
watchedFiles: *.js;iisnode.yml
# uncFileChangesPollingInterval - applications are recycled when the underlying *.js file is modified; if the file resides
# on a UNC share, the only reliable way to detect such modifications is to periodically poll for them; this setting

Просмотреть файл

@ -99,7 +99,7 @@
* configOverrides - optional file name containing overrides of configuration settings of the iisnode section of web.config;
the format of the file is a small subset of YAML: each setting is represented as a <key>: <value> on a separate line
and comments start with # until the end of the line, e.g.
# This is a sample node.config file
# This is a sample iisnode.yml file
nodeProcessCountPerApplication: 2
maxRequestBufferSize: 8192 # increasing from the default
# maxConcurrentRequestsPerProcess: 512 - commented out setting
@ -117,7 +117,7 @@
asyncCompletionThreadCount="0"
initialRequestBufferSize="4096"
maxRequestBufferSize="65536"
watchedFiles="*.js;node.config"
watchedFiles="*.js;iisnode.yml"
uncFileChangesPollingInterval="5000"
gracefulShutdownTimeout="60000"
loggingEnabled="true"
@ -132,7 +132,7 @@
flushResponse="false"
enableXFF="false"
promoteServerVars=""
configOverrides="node.config"
configOverrides="iisnode.yml"
/>
<!--

Просмотреть файл

@ -53,7 +53,7 @@
<File Id="filC84C6F4F3A4A26E6C60922E9EB27A44A" KeyPath="no" Source="$(var.sourcedir)\www\configuration\hello.js" />
<File Id="fil71B6426C908BE42E25A29282F767DFF0" KeyPath="no" Source="$(var.sourcedir)\www\configuration\readme.htm" />
<File Id="fil2F0416F09F068096D5E253A91DCDFB4D" KeyPath="no" Source="$(var.sourcedir)\www\configuration\web.config" />
<File Id="fil2F0416F09F068096D5E253A91DCDFB4F" KeyPath="no" Source="$(var.sourcedir)\www\configuration\node.config" />
<File Id="fil2F0416F09F068096D5E253A91DCDFB4F" KeyPath="no" Source="$(var.sourcedir)\www\configuration\iisnode.yml" />
</Component>
</Directory>
<Directory Id="dir45A892E29212AE212D756BFAD925773B" Name="defaultdocument">

Просмотреть файл

@ -79,7 +79,7 @@
<File Id="fil2F0416F09F068096D5E253A91DCDFB4D" KeyPath="yes" Source="$(var.sourcedir)\www\configuration\web.config" />
</Component>
<Component Id="cmp43304DBF7D5F428226B66D8BCE98F79D" Guid="D677A41F-77E9-4133-A646-54B6800A824C">
<File Id="fil2F0416F09F068096D5E253A91DCDFB4E" KeyPath="yes" Source="$(var.sourcedir)\www\configuration\node.config" />
<File Id="fil2F0416F09F068096D5E253A91DCDFB4E" KeyPath="yes" Source="$(var.sourcedir)\www\configuration\iisnode.yml" />
</Component>
</Directory>
<Directory Id="dir45A892E29212AE212D756BFAD925773B" Name="defaultdocument">

Просмотреть файл

@ -79,7 +79,7 @@
<File Id="fil2F0416F09F068096D5E253A91DCDFB4D" KeyPath="yes" Source="$(var.sourcedir)\www\configuration\web.config" />
</Component>
<Component Win64="yes" Id="cmp43304DBF7D5F428226B66D8BCE98F79D" Guid="D677A41F-77E9-4133-A646-54B6800A824C">
<File Id="fil2F0416F09F068096D5E253A91DCDFB4E" KeyPath="yes" Source="$(var.sourcedir)\www\configuration\node.config" />
<File Id="fil2F0416F09F068096D5E253A91DCDFB4E" KeyPath="yes" Source="$(var.sourcedir)\www\configuration\iisnode.yml" />
</Component>
</Directory>
<Directory Id="dir45A892E29212AE212D756BFAD925773B" Name="defaultdocument">

Просмотреть файл

@ -1,5 +1,5 @@
/*
Number of processes has been changed from 2 specified in web.config to 4 specified in node.config
Number of processes has been changed from 2 specified in web.config to 4 specified in iisnode.yml
*/
var iisnodeassert = require("iisnodeassert");

Просмотреть файл

@ -1,16 +1,16 @@
/*
Changes in node.config recycle the application
Changes in iisnode.yml recycle the application
*/
var iisnodeassert = require("iisnodeassert");
iisnodeassert.sequence([
iisnodeassert.get(10000, "/125_node_config_autoupdate/hello.js?revert", 200, "node.config reverted"),
iisnodeassert.get(10000, "/125_node_config_autoupdate/hello.js?revert", 200, "iisnode.yml reverted"),
iisnodeassert.get(10000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 1"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 1"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 2"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 2"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js?update", 200, "node.config updated"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js?update", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 1"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 1"),
iisnodeassert.get(2000, "/125_node_config_autoupdate/hello.js", 200, "Hello, world 1"),

Просмотреть файл

@ -8,10 +8,10 @@ var iisnodeassert = require("iisnodeassert")
, fs = require('fs');
var existsSync = fs.existsSync || path.existsSync;
var nodeConfig = path.resolve(__dirname, '../www/126_node_config_syntax/node.config');
var nodeConfig = path.resolve(__dirname, '../www/126_node_config_syntax/iisnode.yml');
var isNodeConfigError = function (body) {
assert.ok(-1 !== body.indexOf('unable to read the configuration file node.config'), 'The response body is a node.config dev error');
assert.ok(-1 !== body.indexOf('unable to read the configuration file iisnode.yml'), 'The response body is a iisnode.yml dev error');
};
var deleteConfig = function (next) {
@ -26,35 +26,35 @@ var deleteConfig = function (next) {
iisnodeassert.sequence([
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?empty", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?empty", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, "Hello, world 1"),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?noKey1", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?noKey1", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, isNodeConfigError),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?noKey2", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?noKey2", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, isNodeConfigError),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?emptyValue1", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?emptyValue1", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, "Hello, world 1"),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?emptyValue2", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?emptyValue2", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, "Hello, world 1"),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?unrecognizedKey", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?unrecognizedKey", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, "Hello, world 1"),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?invalidBool", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?invalidBool", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, isNodeConfigError),
deleteConfig,
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?emptyLine", 200, "node.config updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js?emptyLine", 200, "iisnode.yml updated"),
iisnodeassert.get(10000, "/126_node_config_syntax/hello.js", 200, "Hello, world 1"),
deleteConfig
]);

Просмотреть файл

@ -1 +1 @@
node.config
iisnode.yml

Просмотреть файл

@ -6,12 +6,12 @@ http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html' });
var query = require('url').parse(req.url).query;
if (query === 'update') {
require('fs').writeFileSync(require('path').resolve(__dirname, 'node.config'), 'nodeProcessCountPerApplication: 4');
res.end('node.config updated');
require('fs').writeFileSync(require('path').resolve(__dirname, 'iisnode.yml'), 'nodeProcessCountPerApplication: 4');
res.end('iisnode.yml updated');
}
else if (query === 'revert') {
require('fs').writeFileSync(require('path').resolve(__dirname, 'node.config'), 'nodeProcessCountPerApplication: 2');
res.end('node.config reverted');
require('fs').writeFileSync(require('path').resolve(__dirname, 'iisnode.yml'), 'nodeProcessCountPerApplication: 2');
res.end('iisnode.yml reverted');
}
else {
res.end('Hello, world ' + n++);

Просмотреть файл

@ -1 +1 @@
node.config
iisnode.yml

Просмотреть файл

@ -14,7 +14,7 @@ var cases = {
emptyLine: 'foo:bar\n\n\nbaz:7' // success
};
var nodeConfig = path.resolve(__dirname, 'node.config');
var nodeConfig = path.resolve(__dirname, 'iisnode.yml');
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html' });
@ -22,7 +22,7 @@ http.createServer(function (req, res) {
if (typeof cases[query] === 'string') {
fs.writeFileSync(nodeConfig, cases[query]);
res.end('node.config updated');
res.end('iisnode.yml updated');
}
else {
res.end('Hello, world ' + n++);