A beautiful web app written in go with bootstrap
mkdir data
mkdir -p data/images
export GOPATH=/usr/local/go/
go get "github.com/go-sql-driver/mysql"
go get "github.com/julienschmidt/httprouter"
Reference:
#Install MariaDB server and client
yum groupinstall mariadb
#Start MariaDB
systemctl start mariadb.service
#Test install
mysqladmin version
mysql
>SHOW DATABASES;
>exit
#Update password for database
#MySQL by default has an empty password
mysqladmin -u root password "Letmein123";
#mysql -u root -p "Letmein123"
CREATE DATABASE gophr;
USE gopher;
CREATE TABLE `images` (
`id` varchar(255) NOT NULL DEFAULT '',
`user_id` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`location` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`size` int(11) NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id_idx` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#DROP TABLE images
- Level Up Your Web Apps With Go
- [Mastering Go Web Services] (https://www.safaribooksonline.com/library/view/mastering-go-web/)