-
Notifications
You must be signed in to change notification settings - Fork 8
Home
-
Java Development Kit 8: [Download JDK]
-
An empty PostgreSQL database. [Download PostgreSQL]
-
A local copy of the
lingoturk
directory. Note: It is recommended to clone this repository instead of downloading the ZIP. This will enable you to pull future updates more easily.
Before you can run LingoTurk for the first time, you will need to configure it. This section explains how to do that. Installation might take a while, since it will have to download quite a lot.
-
First, you will need to create an Application secret. (The Application secret will be used for cryptographic functions. Therefore, it should never be shared with others!). You can create an Application secret by following these steps:
- Open console
- navigate to the
lingoturk
directory inside your Lingoturk repository - enter:
./sbt playGenerateSecret
. - Open the
lingoturk/conf/application.conf
file in any text editor. - replace
APPLICATION_SECRET
in the lineplay.http.secret.key="APPLICATION_SECRET"
by the freshly created ApplicationSecret.
-
As part of the requirements (see first section of this wiki), you downloaded and installed PostgreSQL. You will now create a database. This is done by following these steps:
- Search for the application
pgAdmin4
on your computer and open it. - When prompted for a password, log in with the password that you entered during the PostgreSQL installation.
- In the top left corner, it will say ‘Servers’. Expand this by clicking on the +-sign preceding it. Expand the following node as well.
- You will see a heading ‘Databases’. Right-click on this and create a new database. A new window will open. Choose a name for your database and click on ‘save’.
- Search for the application
-
In the previous step, you created a database. In this step, we will configure the database connection. You will need the name of your database for this.
- Open the
lingoturk/conf/application.conf
file in any text editor. - Look for the line default.url="postgres://USERNAME:PASSWORD@URL/DATABASE_NAME?characterEncoding=utf8". You are going to replace a few of these words:
- Replace the USERNAME in this line with ‘postgres’ (without the apostrophes).
- Replace the PASSWORD with the password that you entered during the PostgreSQL installation.
- Replace URL with the corresponding URL (i.e. the server your database is running on. In most cases, this will be 'localhost').
- Replace the DATABASE_NAME with the name of the database that you created in the previous step. (note: leave the question-mark following DATABASE_NAME) - Save the file.
- (opt.) Configure SSL. This following step is only required if you are going to run experiments on Amazon Mechanical Turk. An SSL certificate is necessary to run experiments on Amazon Mechanical Turk. It is possible to skip this step for testing purposes. You can find instructions how to configure SSL in Play directly here: Play Framework SSL Configuration
However, I do recommend to use a front end HTTP server. This allows you a more detailed configuration and additional possibilities such as load balancing or redirecting requests to other processes than Play. Detailed configuration examples can be found in the official Play documentation: Setting up a front end HTTP server
Once you have configured LingoTurk, you can start running it. Running LingoTurk is fairly easy. To start the server, follow these steps:
- Start a terminal/command line
- Navigate to the local copy of the
LingoTurk/lingoturk
directory - There are two modes the server can be started in:
- Developing mode: The server will automatically load all changes you make to the Lingoturk files and will also display errors directly in the browser. This makes it easier to find potential problems. This mode should only be used for testing purposes.
- Production mode: The server won't automatically load the changes you make until it will be restarted. Also, it won't display detailed error messages in the browser. This should always be used while you're running an experiment, as it prevents participants from seeing things that should only be seen by yourself.
- To start start the server in developing mode enter
./sbt run
and to start the server in production mode, enter./sbt start
. You can specify parameters such as ports as additional arguments, e.g../sbt "run -Dhttps.port=443 -Dhttp.port=80"
. If no port is specified, Play will bind the application to port9000
. - When your terminal/command line says something similar to "(Server started, use Ctrl+D to stop and go back to the console…)", you can open LingoTurk in your browser:
Navigate to `http://localhost:9000` in case you’re testing the application locally, without specifying a port on startup. Otherwise the format is `PROTOCOL://SERVER_IP:PORT `
This should open the LingoTurk interface. Go to the next section for the initial LingoTurk setup.
- Log in to Lingoturk. The default username is "admin" and the default password is
admin
too. You should change this password immediately. - Click on the
Settings
button. - Enter your
Access key
and yourSecret Key
if you plan to run experiments on MTurk (not necessary for Prolific). - Change the
URL
to the URL that can be used to access the LingoTurk server. - Change the LingoTurk
password
. - Click
Apply changes
.
- Click
Create experiment
. You now have the option to either:
- Use one of the existing experiment types to instantiate an experiment: This will be described here: Instantiating an experiment
- Create a new experiment type: This case will be described here: Creating a new experiment type
Using the instructions on these pages, you will be able to
- publish
- modify
- view
- or delete
an instantiated experiment or to download results.