This is an example of a basic Javascript implementation of a bot for generals.io. Read the tutorial associated with this bot at dev.generals.io/api#tutorial.
$ git clone https://github.com/vzhou842/generals.io-Node.js-Bot-example.git
$ cd generals.io-Node.js-Bot-example
$ npm install
$ node main.js