Based on a gist from @julienarcin.
This node.js app allocates napbots bots based on the current weather condition.
- git
- node.js
- A Napbots account
- Default compositions (which bots to use based on the weather condition) are in
compositions.js. You can change your default allocations (see code comments).
- Clone this repository:
git clone https://github.com/PierrickI3/napbots - Open a terminal and cd to the
napbotsfolder - Run
npm installto install all dependencies - Create a new file called
.envand add the following entries:NAPBOTS_EMAIL=email@domain.com(Email address you use to login to Napbots)NAPBOTS_PASSWORD=mypassword(your Napbots password)
- Run the app:
npm start - Wait until the app is done with either
Success!,No updates are necessaryor an error message if something bad happened.
- To add another bot in the composition, check this image to find out how to retrieve a bot id
- Edit
index.jsand change thecompositionsobject accordingly
- Login to your AWS account via the AWS CLI:
aws configure - Run
serverless deploy. Default is set to run every 10 minutes.
