Skip to content
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

Azure template fix #1519

Merged
merged 7 commits into from
Apr 12, 2017
Merged

Conversation

paulvanbrenk
Copy link
Contributor

The NodeJs templates in VS no longer work on Azure. This cleans up the templates to they work without changes.

Paul van Brenk added 2 commits February 2, 2017 16:19

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.

comment out debug statement
<!-- 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"
type="Microsoft.NodejsTools.Debugger.WebSocketProxy, Microsoft.NodejsTools.WebRole"/>-->
Copy link
Member

Choose a reason for hiding this comment

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

So still removing this bit then - not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed in reverting change

<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

@@ -2,8 +2,13 @@
"name": "$npmsafeprojectname$",
"version": "0.0.0",
"description": "$projectname$",
"main": "app.js",
"scripts": {
"start": "node server"
Copy link
Member

Choose a reason for hiding this comment

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

Did the main module change from app.js to server.js?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

@@ -2,8 +2,13 @@
"name": "$npmsafeprojectname$",
"version": "0.0.0",
"description": "$projectname$",
"main": "app.js",
"scripts": {
"start": "node server"
Copy link
Member

Choose a reason for hiding this comment

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

likewise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep changed from app to server


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.

same issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed


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.

same issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and fixed

Copy link
Member

@billti billti left a comment

Choose a reason for hiding this comment

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

If you've actually verified the worker stuff role works with these changes (which is different in behavior to an Azure Web App), then looks good to me - thanks!

@paulvanbrenk paulvanbrenk merged commit 78bfe71 into microsoft:master Apr 12, 2017
@paulvanbrenk paulvanbrenk deleted the azureTemplateFix branch April 12, 2017 20:42
uniqueiniquity pushed a commit to uniqueiniquity/nodejstools that referenced this pull request Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants