Skip to content

Setting up a local environment

Thomas G. Boop edited this page Jan 30, 2017 · 1 revision

Steps to create a local environment

Download Java 8 & Install

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Download Android Studio & Install

https://developer.android.com/studio/index.html

Download & install Postgres

brew install postgres

Download & install Rabbitmq through Homebrew

https://www.rabbitmq.com/install-homebrew.html

brew install rabbitmq

set PATH variable for rabbitmq-server.

Clone the repo & do initial setup

git clone https://github.com/csync/csync-server

make update

Start Postgres

brew services start postgres

Start rabbitmq

brew services start rabbitmq

Create a psql db

createdb

Run tests

sbt test

Accessing the DB

When you run sbt test, all the updates go to a separate namespace in the PSQL database. Each user - through the Play configuration setup - accesses a DB of their own name. Within this DB, sbt test uses a namespace (aka schema) called testing.

To see the test data in the psql repl, fire up sql and issue the command

set search_path to testing;

Now you can use all the usual psql commands to examine the data. E.g. "\dt" will show the tabels within this schema

A note of warning: Since our table names are the same for test and production, you have to switch your search_path back if you want to look at the production tables. Those are in the default postgres schema called "public"