This file contains hidden or 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
productsapi: | |
build: ./productsapi | |
dns: | |
- 172.16.4.2 | |
- 172.16.4.13 | |
- 10.49.32.4 | |
ports: | |
- "80" | |
volumes: | |
- ./productsapi:/var/www |
This file contains hidden or 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
productsapi: | |
build: ./productsapi | |
dns: | |
- 172.16.4.2 | |
- 172.16.4.13 | |
- 10.49.32.4 | |
ports: | |
- "8080:80" | |
volumes: | |
- ./productsapi:/var/www |
This file contains hidden or 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
VALID_WIKIPEDIA_REGEX = /\Ahttp:\/\/en.wikipedia.org\/wiki\/.{1,}\z/ |
This file contains hidden or 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
// Include http module, | |
var http = require("http"), | |
// And url module, which is very helpful in parsing request parameters. | |
url = require("url"); | |
// Create the server. | |
http.createServer(function (request, response) { | |
// Attach listener on end event. | |
request.on('end', function () { | |
// Parse the request for arguments and store them in _get variable. |
This file contains hidden or 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"); | |
http.createServer(function(request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.write("Hello World"); | |
response.end(); | |
}).listen(8888); |
This file contains hidden or 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
<script type="text/javascript"> | |
var COUNTER = (function () { | |
var counter = {}, | |
num = 0, | |
increment = function () { | |
console.log(num += 1); |
This file contains hidden or 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
<script type="text/javascript"> | |
// define a var to be used as an app namespace | |
var APP = (function () { | |
// define an object which will be returned, single 'var' pattern | |
var app = {}, | |
// define some private 'functions' and vars if necessary | |
priv1 = function () { |