Skip to content

Azure template fix #1519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 2 additions & 38 deletions Nodejs/Product/Nodejs/Nodejs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1025,19 +1025,11 @@
<ZipProject Include="ProjectTemplates\CloudService\ServiceConfiguration.Cloud.cscfg" />
<ZipProject Include="ProjectTemplates\CloudService\ServiceConfiguration.Local.cscfg" />
<ZipProject Include="ProjectTemplates\CloudService\ServiceDefinition.csdef" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureNodejsWorkerRole\download.ps1" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureNodejsWorkerRole\node.cmd" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureNodejsWorkerRole\package.json" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureNodejsWorkerRole\README.md" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureNodejsWorkerRole\setup_worker.cmd" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureNodejsWorkerRole\Worker.njsproj" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\ChangeConfig.ps1" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\download.ps1" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\iisnode.yml" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\node.cmd" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\package.json" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\README.md" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\setup_web.cmd" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\TypeScriptWebApp.njsproj" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\Web.config" />
<ZipProject Include="ProjectTemplates\TypeScriptAzureWebRole\Web.Debug.config" />
Expand All @@ -1053,12 +1045,6 @@
<ZipProject Include="ProjectTemplates\AzureExpress4App\package.json" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\README.md" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\main.css" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\www" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\ChangeConfig.ps1" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\download.ps1" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\iisnode.yml" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\node.cmd" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\setup_web.cmd" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\Web.config" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\Web.Debug.config" />
<ZipItem Include="Templates\Files\TypeScriptJSX\EmptyTsx.tsx" />
Expand All @@ -1075,12 +1061,10 @@
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\serve-static.typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\mine.typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\www" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\express-serve-static-core.typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\express.typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\serve-static.typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\mine.typings.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\www" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\typings.json" />
<ZipItem Include="Templates\Files\EmptyJson\EmptyJson.json" />
<ZipItem Include="Templates\Files\EmptyLess\EmptyLess.less" />
Expand Down Expand Up @@ -1191,7 +1175,6 @@
<ZipProject Include="ProjectTemplates\Express4App\index.js" />
<ZipProject Include="ProjectTemplates\Express4App\Preview.png" />
<ZipProject Include="ProjectTemplates\Express4App\users.js" />
<ZipProject Include="ProjectTemplates\Express4App\www" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\app.js" />
<ZipProject Include="ProjectTemplates\AzureExpress4App\ExpressApp.njsproj">
<SubType>Designer</SubType>
Expand Down Expand Up @@ -1237,11 +1220,8 @@
<ZipProject Include="ProjectTemplates\AzureNodejsWorker\Worker.vstemplate">
<SubType>Designer</SubType>
</ZipProject>
<ZipProject Include="ProjectTemplates\AzureNodejsWorker\download.ps1" />
<ZipProject Include="ProjectTemplates\AzureNodejsWorker\node.cmd" />
<ZipProject Include="ProjectTemplates\AzureNodejsWorker\package.json" />
<ZipProject Include="ProjectTemplates\AzureNodejsWorker\README.md" />
<ZipProject Include="ProjectTemplates\AzureNodejsWorker\setup_worker.cmd" />
<ZipItem Include="Templates\Files\MochaUnitTest\UnitTest.vstemplate">
<SubType>Designer</SubType>
</ZipItem>
Expand Down Expand Up @@ -1293,20 +1273,15 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<ZipProject Include="ProjectTemplates\AzureNodejsApp\ChangeConfig.ps1" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\download.ps1" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\AzureNodejsApp.njsproj">
<SubType>Designer</SubType>
</ZipProject>
<ZipProject Include="ProjectTemplates\AzureNodejsApp\package.json" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\README.md" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\setup_web.cmd" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\Web.Debug.config">
<SubType>Designer</SubType>
</ZipProject>
<ZipProject Include="ProjectTemplates\AzureNodejsApp\Web.config" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\node.cmd" />
<ZipProject Include="ProjectTemplates\AzureNodejsApp\iisnode.yml" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you leaving the iisnode.yml file in some templates, and not others? Is it needed in some?

Copy link
Contributor Author

@paulvanbrenk paulvanbrenk Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed from the actual projects, put left in the csproj file by accident. Removed now

<ZipProject Include="ProjectTemplates\NodejsWebApp\NodejsWebApp.njsproj">
<SubType>Designer</SubType>
</ZipProject>
Expand All @@ -1322,6 +1297,7 @@
<SubType>Designer</SubType>
</TypeScriptProject>
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\index.pug" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\error.pug" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\layout.pug" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\package.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\README.md" />
Expand All @@ -1331,28 +1307,19 @@
</TypeScriptProject>
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\package.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\README.md" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\ChangeConfig.ps1" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\download.ps1" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\node.cmd" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\Web.Debug.config" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\Web.config" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\setup_web.cmd" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureWebApp\iisnode.yml" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\TypeScriptExpressApp.njsproj">
<SubType>Designer</SubType>
</TypeScriptProject>
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\index.pug" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\error.pug" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\layout.pug" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\package.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\README.md" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\main.css" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\ChangeConfig.ps1" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\download.ps1" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\node.cmd" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\setup_web.cmd" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\Web.Debug.config" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\Web.config" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\iisnode.yml" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\Preview.png" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\server.ts" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\startup.ts" />
Expand All @@ -1362,11 +1329,8 @@
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\Worker.vstemplate">
<SubType>Designer</SubType>
</TypeScriptProject>
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\download.ps1" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\node.cmd" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\package.json" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\README.md" />
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureNodejsWorker\setup_worker.cmd" />
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>$guid1$</ProjectGuid>
<ProjectHome>.</ProjectHome>
<StartupFile>bin\www</StartupFile>
<StartupFile>app.js</StartupFile>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
Expand All @@ -30,7 +30,6 @@
<Compile Include="app.js" />
<Compile Include="routes\index.js" />
<Compile Include="routes\users.js" />
<Compile Include="bin\www" />
<Content Include="package.json" />
<Content Include="public\stylesheets\main.css" />
<Content Include="README.md" />
Expand All @@ -52,10 +51,6 @@ $endif$
<ItemGroup>
<Content Include="Web.config" />
<Content Include="Web.Debug.config" />
<Content Include="bin\ChangeConfig.ps1" />
<Content Include="bin\download.ps1" />
<Content Include="bin\setup_web.cmd" />
<Content Include="bin\node.cmd" />
</ItemGroup>
<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@
<ProjectItem>layout.pug</ProjectItem>
<ProjectItem>error.pug</ProjectItem>
</Folder>
<Folder Name="bin">
<ProjectItem ReplaceParameters="true">www</ProjectItem>
<ProjectItem>ChangeConfig.ps1</ProjectItem>
<ProjectItem>download.ps1</ProjectItem>
<ProjectItem>setup_web.cmd</ProjectItem>
<ProjectItem>node.cmd</ProjectItem>
</Folder>
<ProjectItem ReplaceParameters="true">Web.config</ProjectItem>
<ProjectItem ReplaceParameters="true">Web.Debug.config</ProjectItem>
<ProjectItem OpenInEditor="true">app.js</ProjectItem>
Expand Down
35 changes: 20 additions & 15 deletions Nodejs/Product/Nodejs/ProjectTemplates/AzureExpress4App/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<staticContent>
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>

<modules runAllManagedModulesForAllRequests="false" />

<!-- Web.Debug.config adds attributes to this to enable remote debugging when publishing in Debug configuration. -->
<iisnode watchedFiles="web.config;*.js;routes\*.js;views\*.pug"/>

<!-- Remote debugging (Azure Website with git deploy): Comment out iisnode above, and uncomment iisnode below. -->
<!--<iisnode watchedFiles="web.config;*.js;routes\*.js;views\*.pug"
loggingEnabled="true"
Expand All @@ -33,8 +33,8 @@
<!-- indicates that the server.js file is a Node.js application
to be handled by the iisnode module -->
<handlers>
<add name="iisnode" path="/bin/www" verb="*" modules="iisnode" />
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />

<!-- Remote debugging (Azure Website with git deploy): Uncomment NtvsDebugProxy handler below.
Additionally copy Microsoft.NodejsTools.WebRole to 'bin' from the Remote Debug Proxy folder.-->
<!--<add name="NtvsDebugProxy" path="ntvs-debug-proxy/$guid2$" verb="*" resourceType="Unspecified"
Expand All @@ -52,23 +52,28 @@
<rewrite>
<rules>
<clear />
<!-- Remote debugging (Azure Website with git deploy): Uncomment the NtvsDebugProxy rule below. -->
<!--<rule name="NtvsDebugProxy" enabled="true" stopProcessing="true">
<match url="^ntvs-debug-proxy/.*"/>
</rule>-->
<!-- Remote debugging (Azure Website with git deploy): Uncomment the NtvsDebugProxy rule below. -->
<!--<rule name="NtvsDebugProxy" enabled="true" stopProcessing="true">
<match url="^ntvs-debug-proxy/.*"/>
</rule>-->

<!-- Don't interfere with requests for node-inspector debugging -->
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^server.js\/debug[\/]?" />
</rule>

<rule name="app" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="iisnode.+" negate="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="bin\www" />
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
</system.webServer>

<!-- Remote debugging (Azure Website with git deploy): uncomment system.web below -->
<!--<system.web>
<httpRuntime targetFramework="4.5"/>
<customErrors mode="Off"/>
</system.web>-->
<!-- Remote debugging (Azure Website with git deploy): uncomment system.web below -->
<!--<system.web>
<httpRuntime targetFramework="4.5"/>
<customErrors mode="Off"/>
</system.web>-->
</configuration>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
var debug = require('debug');
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
Expand Down Expand Up @@ -57,5 +58,8 @@ app.use(function (err, req, res, next) {
});
});

app.set('port', process.env.PORT || 3000);

module.exports = app;
var server = app.listen(app.get('port'), function () {
debug('Express server listening on port ' + server.address().port);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try running this and seeing if there are errors? I don't see where 'debug' is defined/imported, so I assume this line throws.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to comment that out in the template.

});

This file was deleted.

Loading