To use psql acgtweet on the command line: echo 'export PATH="/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH"' >> ~/.bash_profile
Installation
All packages will automatically download (are already downloaded?) with the exception of the following:
go get github.com/go-sql-driver/mysql
Development
Start mysql mysql.server start
To run the local environment goapp serve hello.go
This will start a local server running at localhost:8080
Will watch files and auto recompile.
Note that there is no need for a main() because we use the google app engine.
TODO: To make the code more portable we could include a main which would call hello.go.
Deployment
To upload to google app engine: appcfg.py -A acgtweet -V v1 update ./
(goapp deploy may also work if your pc is setup...)
Mysql
Connect mysql -u root -p (password==password).
Create user CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';
Reload privileges FLUSH PRIVILEGES;