This is mostly useful as a way to learn about the basics of the IRC protocol, or as a very minimalist IRC setup.
git clone https://github.com/maxlath/irc-logger
npm install
then edit config/local.js
to fit your needs
module.exports = {
serverName: 'irc.freenode.net',
port: 6667,
user: 'chatbot',
channels: ['#somechannel']
}
Option 1 - print logs in the terminal
node server.js
Option 2 - start the process as a daemon and print logs in a file
You can use a tool like aeternum to start the process as a daemon (allowing to close the terminal while the process keeps running) and output the logs in the desired files
aeternum -o logs.txt -e errors.txt -- node server.js
then you can even follow the logs live with this command:
tail -fn 500 logs.txt errors.txt