Created
February 9, 2016 22:23
-
-
Save wsrzx/465d5e690330d7c8151c to your computer and use it in GitHub Desktop.
Como publicar um Web App construído com Node.JS no Azure App Service partindo do OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Partiu Azure", | |
"version": "0.0.1", | |
"description": "", | |
"main": "./server.js", | |
"engines": { "node": ">= 0.6.0" } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var port = process.env.port || 1337; | |
http.createServer(function (req, res) { | |
res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
res.end(‘Partiu Azure =) \n’); | |
}).listen(port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<modules runAllManagedModulesForAllRequests="false" /> | |
<!-- indicates that the server.js file is a node.js application | |
to be handled by the iisnode module --> | |
<handlers> | |
<add name="iisnode" path="server.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<rewrite> | |
<rules> | |
<clear /> | |
<rule name="app" enabled="true" patternSyntax="ECMAScript" stopProcessing="true"> | |
<match url="server\.js.+" negate="true" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> | |
<action type="Rewrite" url="server.js" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment