Skip to content

Commit faaa590

Browse files
committed
Added initial server files
1 parent 799997f commit faaa590

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

index.js

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

package.json

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

0 commit comments

Comments
 (0)