Skip to content
Mats Sjöberg edited this page Mar 13, 2016 · 3 revisions

Configure

If you wish to change the default configuration, you need to create a file config/application-local.properties. The easiest way is to copy the config/application-local.properties.example that is included in this git repository. Some of the most common configuration options are explained below.

TCP port

The default TCP port where the DiMe server runs is 8080, you can change this with the server.port setting.

server.port = 8080

Change location of database

By default DiMe uses the H2 database, you can change its location:

spring.datasource.url = jdbc:h2:file:~/.dime/database/h2

Using MySQL

If you wish to use MySQL instead of the embedded H2 database you need to set the correct server, database, username and password:

spring.datasource.url = jdbc:mysql://localhost:3306/dime
spring.datasource.username = dime
spring.datasource.password = sikritpasswordhere
spring.datasource.driverClassName = com.mysql.jdbc.Driver

Configure Lucene

You can specify the location of the Lucene index, and what analyzer to use (current supported: Standard and English). Example (showing defaults):

dime.luceneIndexPath = ${user.home}/.dime/lucene
dime.luceneAnalyzer = Standard

Debugging

You can make DiMe server show more verbose output, which can help in debugging:

logging.level.fi.hiit.dime = DEBUG

CORS support

For example when developing a JavaScript application you may want to temporarily allow CORS access to that domain:

dime.corsAllowOrigin=http://localhost:3001
Clone this wiki locally