rainbow23 / historykeeper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to link a folder with an existing Heroku app

git:remote -a historykeeper

build process

  1. exec below command
govendor init
govendor fetch +out
  1. add line in Procfile
web: bin/historyKeeper
  1. deploy app
git push -u origin main
  1. open app
heroku open

local build process

  1. create .env file
touch .env
heroku config:get db_database -s  >> .env
heroku config:get db_host -s  >> .env
heroku config:get db_port -s  >> .env
heroku config:get db_database -s  >> .env
heroku config:get db_username -s  >> .env
  1. created bin folder Procfile definition↓
go build -o bin/historyKeeper -v .
  1. deploy app
heroku local web
  1. open app
open http://localhost:5000/

table

CREATE TABLE user_info( \
    id INT NOT NULL AUTO_INCREMENT,\
    username   VARCHAR(64) NOT NULL UNIQUE,\
    password   VARCHAR(64) NOT NULL UNIQUE,\
    created_at TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP,\
    updated_at TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\
    index(id)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
create table shell_history(\
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\
    username    VARCHAR(64) NOT NULL,\
    command     VARCHAR(256) NOT NULL UNIQUE,\
    date        DATETIME     NOT NULL,\
    CONSTRAINT fk_username\
        foreign key (username)\
        references user_info(username)\
        ON DELETE RESTRICT ON UPDATE RESTRICT\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

About


Languages

Language:Go 82.6%Language:HTML 14.9%Language:Shell 2.4%Language:Procfile 0.1%