Code Monkey home page Code Monkey logo

fifamobilebot's Introduction

Answers HQ Discord BoT


Cloning local repository

$ git clone https://github.com/fifa-mobile/discord-bot.git dev

change to dev directory

$ cd dev

install npm packages

$ npm install

setup configs files; copy *.tmp files and remove the .tmp extension

ask yuulye for BoT token.

setup local database

https://stackabuse.com/adding-a-postgresql-database-to-a-node-js-app-on-heroku/

set config/config.json as your database setting

to prevent your local changes being committed

$ git update-index --assume-unchanged config/config.json

Database migration

$ npx sequelize-cli db:migrate

Run the app

$ npm start


heroku cli

login

$ heroku login -i

enter you login info

creating database on heroku

heroku addons:create heroku-postgresql:hobby-dev -a appname

connect with heroku database

$ heroku pg:psql -a appname

running migration

$ heroku run bash -a appname $ sequelize db:migrate

Database Installation

choose your platform example: https://www.postgresql.org/download/linux/ubuntu/

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql

Database User Creation

sudo -u postgres psql

postgres=# CREATE USER username;
CREATE ROLE

postgres=# ALTER USER jon SUPERUSER CREATEDB;
ALTER ROLE

postgres=# \du

$ createdb username

$ psql

username=# CREATE DATABASE dbname;
CREATE DATABASE

Running migration

npx sequelize-cli db:migrate

fifamobilebot's People

Contributors

yuulye avatar pradeep5986 avatar baytarizm avatar dependabot[bot] avatar mahadhir1605 avatar

Stargazers

 avatar

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.