This is a guide for running a local copy of SpartaHack API at http://api.spartahack-api.dev/
Open terminal and run the following commands in order to install Command Line Tools and homebrew
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You'll also need some extra libraries installed:
brew install libtool libxslt libksba openssl
Open terminal and run the following command
\curl -sSL https://get.rvm.io | bash
Close and reopen terminal. Run the following commands
rvm install 2.2.5
rvm --default use 2.2.5
And then execute:
gem install bundle
After which we update the gems on the whole system:
gem update --system
Run the following commands in terminal
brew install postgresql
gem install pg
Now go to http://postgresapp.com/ and install Postgress.app.
Open the app and click on Open psql
. A terminal window should pop up.
Run the following commands
CREATE ROLE dev NOSUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;
ALTER ROLE dev WITH PASSWORD 'spartahack-api';
Postgres must be running in the background to run SpartaHack API locally.
Clone Spartahack API and cd
into it.
Execute the commands:
bundle install
rake db:drop db:create db:migrate
Run the following commands to install POW and link it to the SpartaHack API
curl get.pow.cx | sh
cd ~/.pow
ln -s {/path/to/SpartaHack-API/}
You're good to go!
To do.
Is that a thing? To Do.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request