Skip to content

Setup Install Guide

Daniel Anner edited this page Apr 10, 2019 · 12 revisions

This guide was setup and tested using the following prerequisites:

  • Node v10.15.3
  • NPM v6.9.0
  • forever v0.15.3
  • MySQL v8.0.15
  • An open port on 4000, and 4001

Built and tested on the following virtualized machine:

  • Virtualization: xen
  • Operating System: CentOS Linux 7 (Core)
  • CPE OS Name: cpe:/o:centos:centos:7
  • Kernel: Linux 3.10.0-957.10.1.el7.x86_64
  • Architecture: x86-64

Follow these steps during setup:

Clone the repo and set it up

  1. run: mkdir -p /var/www/
  2. run mkdir -p /var/www_conf/BunnyAPI
  3. Clone the repo into /var/www cd /var/www/ && git clone https://github.com/danner26/BunnyAPI.git
  4. Install node modules cd BunnyAPI/backend/ && npm install
  5. Make your config file touch /var/www_conf/BunnyAPI/db_conf.js
  6. Add the following to your config file
module.exports = {
  host: 'localhost',
  user: 'USERNAME',
  password: 'PASSWORD',
  database: 'DB_NAME',
  secret: 'SECRET_KEY',
};
  1. Make any further changes to the API code as required

Setup the SQL tables and users

  1. cd /var/www/BunnyAPI/docs
  2. We recommend you change the API user passwords in the post.sql file.. For the bunny_write user, make sure the password is the same as step #6's password!
  3. Run the setup script as the root user mysql -u root -p < setup_database.sql

You are ready to start it up!

  1. Start the server and watch the logs cd /var/www/BunnyAPI && ./start-bunny.sh
  2. Grab the output of the logs and make sure it is running cat /var/www/BunnyAPI/backend/logs/API/API.log

If all is working

  1. Tail the file, and run the script to test tail -f /var/www/BunnyAPI/backend/logs/API/API.log
  2. If the data is added to the table, then you should see something like this:
Added data to table [ { signon_realm: 'https://www.facebook.com/',
    username_value: '[email protected]',
    password_value: 'Unencrypted_Password' },
  { signon_realm: 'https://www.reddit.com/',
    username_value: 'USERNAME',
    password_value: 'Unencrypted_Password' } ]
  1. Check the database! mysql -u root -p
  2. use bunnyapi; select * from chrome_data;

If all is NOT working

  1. Well, make sure you have all prerequisets installed, and please go over the steps again. Please, try the steps again and watch closely for errors. Most errors will tell you exactly what is wrong (like missing modules or a missing file ex. db_conf.js)
  2. If you are still having issues, feel free to create a new ⁉️ Need help with BunnyAPI? issue and we will try our best to help!