This repository has been archived by the owner on May 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Mac Developer Quick Start
DC edited this page Sep 22, 2013
·
13 revisions
You'll need Homebrew.
Once you have that, here's a script that does everything else.
#!/bin/bash
set -e
# Install MySQL
echo "Installing MySQL. Better have Homebrew!"
brew update
brew install mysql
# Set up MySQL locally
# (By default, MySQL only accepts connections from localhost.
# Do NOT allow outside connections unless you've locked it down first.)
# Make a user `scramble` and corresponding DB.
echo "Creating MySQL user 'scramble' and database 'scramble', password 'scramble'..."
read -s -p "Enter MySQL root password: " pass
echo ""
(
echo "create database if not exists scramble;"
echo "grant all on scramble.* to scramble@localhost identified by 'scramble';"
echo "flush privileges;"
) | mysql -u root -p$pass
# Install and configure some dependencies.
brew install markdown go
echo "export GOPATH=$HOME/go" >> ~/.bashrc
source ~/.bashrc
# Set up host name for development
echo "127.0.0.1 dev.scramble.io" | sudo tee -a /etc/hosts
# Clone the repo into ~/go/src/scramble
mkdir -p ~/go/src
cd ~/go/src
git clone [email protected]:dcposch/scramble
cd scramble
# Compile and run
go get .
make
echo "Done! Now browse to http://dev.scramble.io:8888"