Skip to content

Instantly share code, notes, and snippets.

@darkowlzz
Created November 24, 2014 23:05
Show Gist options
  • Save darkowlzz/4cfb750ff6ae3602ffc3 to your computer and use it in GitHub Desktop.
Save darkowlzz/4cfb750ff6ae3602ffc3 to your computer and use it in GitHub Desktop.
simple mybot deployment on heroku
var http = require('http');
var request = require('request');
var port = process.env.PORT || 5000;
var Bot = require('mybot');
CHANNEL_NAME = '##til';
var config = {
nick: 'kurochanbot',
server: 'irc.freenode.net',
channels: ['##til'],
plugins: ['remember', 'cookies']
};
var bot = new Bot(config);
bot.connect();
var server = http.createServer(function(request, response) {
response.writeHeader(200, {"Content-Type": "text/plain"});
response.write("Hello World!");
response.end();
});
server.listen(port);
console.log('Server running on ' + port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment