Exemplo n.º 1
0
		stop: function (callback) {
			var http = this._httpServer,
				https = this._httpsServer,
				onStop = (callback || function () {}).bind(this);

			http && http.close(onStop);
			https && https.close(onStop);

			return this;
		}
Exemplo n.º 2
0
	consumer.getOAuthRequestToken(function(err, oauth_token, oauth_token_secret, results ){
	    console.log('==>Get the request token');
	    console.log(arguments);

	    // Get the authorized access_token with the un-authorized one.
		consumer.getOAuthAccessToken(arguments[1], arguments[2], function (err, oauth_token, oauth_token_secret, results){
			console.log('==>Get the access token');
			console.log(arguments);
		});

		http.close();
	});
Exemplo n.º 3
0
/**
 * Created by igor on 28.07.14.
 */
var http = require('http');

http.createServer(function (req, res) {
    res.writeHead(200, {'Contebt-Type': 'text/plain'});
    res.end('Hello World\n');
}).listen(8080);
http.close();
console.log('Server running on port 8080.');