Giter Club home page Giter Club logo

pokebot's Introduction

pokebot-oak

pokebot-oak is a chat bot based on the Hubot framework. Originally generated by generator-hubot. Configured for deployment on Heroku.

Resources:

Heroku

Hubot

Hubot Yeoman Generator

Change adapter

Hubot Adapters

Deployment help

Deploy with Node

Deploy on Heroku

Deploy on Unix

Deploy on Windows

Adding scripts

Scripting Guide

  • Find new scripts with:
npm search hubot-scripts ______

Troubleshooting

If you're having issues, adding this line to your bin/hubot or Heroku .env file to see dev debug info:

export HUBOT_LOG_LEVEL="debug"

Running Locally via terminal

  • Clone the repospity:
git clone [email protected]:Studnicky/pokebot.git && cd pokebot
HUBOT_HEROKU_KEEPALIVE_URL = (your heroku app url)
HUBOT_SLACK_TOKEN = (your slack API token)
  • Install prereq's (requires npm and node to be installed globally)
npm install
  • To test locally in terminal, start pokebot with gulp:
gulp run-local

You should see some start up output and a prompt. If not, you broke it.

[Sat Feb 28 2015 12:38:27 GMT+0000 (GMT)] INFO Using default redis on localhost:xxxx
pokebot>
  • Start using pokebot!
pokebot> pokebot help

Using a local postgres install

sudo -u postgres psql
  • Make a new user named pokebot with database creation privileges
postgres=#	CREATE USER pokebot CREATEDB CREATEUSER PASSWORD 'oak';
  • Create a new empty database named pokebot for user pokebot to use
postgres=#	CREATE DATABASE pokebot OWNER pokebot TEMPLATE template0;
  • Exit and log back in as pokebot, enter the password you just made when prompted:
postgres=#	\q
$ psql -h localhost -U pokebot
Password for user pokebot:
  • Make sure the pokebot database exists and belongs to pokebot
postgres=# \l

     Name      |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
---------------+----------+----------+-------------+-------------+-----------------------
 pokebot       | pokebot  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 

(5 rows)

If that's all set up correctly, go ahead and exit psql. Sequelize will do the rest.

postgres=#	\q

If that's not what you see, consult the postgres manual.

Database import instructions coming soon

Extra Configuration

A few scripts (including some installed by default) require environment variables to be set as a simple form of configuration.

Each script should have a commented header which contains a "Configuration" section that explains which values it requires to be placed in which variable. When you have lots of scripts installed this process can be quite labour intensive. The following shell command can be used as a stop gap until an easier way to do this has been implemented.

    grep -o 'hubot-[a-z0-9_-]\+' external-scripts.json | \
      xargs -n1 -I {} sh -c 'sed -n "/^# Configuration/,/^#$/ s/^/{} /p" \
          $(find node_modules/{}/ -name "*.coffee")' | \
        awk -F '#' '{ printf "%-25s %s\n", $1, $2 }'

How to set environment variables will be specific to your operating system. Rather than recreate the various methods and best practices in achieving this, it's suggested that you search for a dedicated guide focused on your OS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.