Coder Social home page Coder Social logo

historykeeper's Introduction

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 ;

historykeeper's People

Contributors

rainbow23 avatar

Watchers

James Cloos avatar  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.