Setting up a Development Environment
Writtien by Jay Heejae Park
---------------------------------------------------------------------
SCALA:
Download Typesafe IDE for Scala 2.10.1 at
-
http://typesafe.com/stack/downloads/scala-idewhich is a full packaged version (includes eclipse and scala IDE)
SCALATEST:
to install SCALATEST
-
http://scalatest.org/user_guide/using_scalatest_with_eclipse
PLAY:
Install Play framework
-www.playframework.org
after downloading, move it to a location where you can access.
In Linux command;
export PATH=/(directories)/play:$PATH
ex) export PATH=$HOME/play:$PATH
(you could permanently add this command by,
going into home/user/.bashrc and adding
echo "play activated"
export PATH=$HOME/play:$PATHat the end of the file.
Work through the Play tutorial
-www.playframework.com/documentation/2.1.1/ScalaTodoList
POSTGRES:
Install postgres database
from
http://www.postgresql.org/or
in linux command, 'apt-get install postgresql' (might need to add sudo infront of the command to gain access)
To set up a server,
(By default in Ubuntu, Postgresql is configured to use 'ident sameuser' authentication for any connections from the same machine. In here, $USER should be your Ubuntu(linux) username eg. $USER = hj7park)
these are the commands that need to be ran
sudo -u postgres createuser --superuser $USER
sudo -u postgres psql
postgres=# \password $USER
To create a new database,
createdb $USER
psql
PGADMIN:
Install postgres database
from
http://www.pgadmin.org/or
in linux command, '
apt-get install pgadmin3' (might need to add sudo infront of the command to gain access)
GITHUB:
create an account at GITHUB
www.github.com
and download git-gui client from
http://git-scm.com/downloads/guis (according to your platform)
To Connect:
- Assumming that all of the above steps are done,
- Set up the local .pg_service.conf file to be something like this.
[yourdatabasename]
host=localhost
port=5432
dbname=yourdatabasebane
user=hj7park
- To generate the test database for the Oat, run the command below and configure.
- run psql service=yourdatabasename < load.sql in the oat_testdb/02_core folder.
- run psql service=yourdatabasename < init.sql in the oat_sql folder.
-
Run command play from the oat folder and wait until it loads.
- Finally run ~run in the play framework and then localhost:9000 should be set to your project.