Skip to content

Commit 2bfc7e6

Browse files
committed
initial code check-in
1 parent 8926c9a commit 2bfc7e6

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Node.js Hello World
2+
3+
This sample demonstrates a tiny Hello World node.js app for [App Service Web App](https://docs.microsoft.com/azure/app-service-web).
4+
15
# Contributing
26

3-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
7+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var http = require('http');
2+
3+
var server = http.createServer(function(request, response) {
4+
5+
response.writeHead(200, {"Content-Type": "text/plain"});
6+
response.end("Hello World!");
7+
8+
});
9+
10+
var port = process.env.PORT || 1337;
11+
server.listen(port);
12+
13+
console.log("Server running at http://localhost:%d", port);

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "app-service-hello-world",
3+
"description": "Simple Hello World Node.js sample for Azure App Service",
4+
"version": "0.0.1",
5+
"private": true,
6+
"license": "MIT",
7+
"author": "Microsoft",
8+
"engines": {
9+
"node": "~6.3"
10+
},
11+
"scripts": {
12+
"start": "node index.js"
13+
}
14+
}

0 commit comments

Comments
 (0)