-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jim Buck
committed
Aug 6, 2016
1 parent
c72d1ae
commit 57394bc
Showing
10 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"inputs":["c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\project.json","c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\project.lock.json","c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\Program.cs"],"outputs":["c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.dll","c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.pdb","c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.deps.json","c:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.runtimeconfig.json"],"buildArguments":{"version-suffix":null}} | ||
{"inputs":["C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\project.json","C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\project.lock.json","C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\Program.cs"],"outputs":["C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.dll","C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.pdb","C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.deps.json","C:\\Projects\\Personal\\playbook\\test\\dotnet-a\\bin\\Debug\\netcoreapp1.0\\dotnet-a.runtimeconfig.json"],"buildArguments":{"version-suffix":null}} |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
|
||
var port = 6014; | ||
var http = require('http'); | ||
var url = require('url') | ||
|
||
console.log('Hello world!'); | ||
var server = http.createServer(function (req, res) { | ||
var query = url.parse(req.url,true).query; | ||
var json = JSON.stringify(query, null, 4); | ||
console.log(json); | ||
res.writeHead(200, { 'Content-Type': 'application/json', "Access-Control-Allow-Origin":"*" }); | ||
res.end(json); | ||
}); | ||
|
||
server.listen(6014, () => { | ||
console.log(`Server listening on port "${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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
let http = require('http'); | ||
const PORT = 6014; | ||
|
||
let server = http.createServer((request, response) => { | ||
response.end('Request Path: ' + request.url); | ||
}); | ||
|
||
server.listen(PORT, () => { | ||
console.log(`node-b server listening on: http://localhost:${PORT}`); | ||
}); | ||
setInterval(() => { | ||
let randomNum = Math.random(); | ||
if(randomNum < 0.9){ | ||
process.stdout.write(`It was a great draw! ${randomNum}`); | ||
} else { | ||
process.stderr.write(`It was a bad draw! ${randomNum}`); | ||
} | ||
}, 100); |