Skip to content

Configuration Settings

MikeKlemarewski edited this page Jun 22, 2012 · 4 revisions

All configuration settings such as server and database port numbers or host url's should be specified in the config.json.defaults file. The values in the default file will be agreed upon and are not to be modified. When you first clone a repo, make a copy of the config.json.defaults file and simply call it config.json. The default values should be good enough for you to start development. If you need to make any changes to any settings, only change your config.json file. Make sure that your config.json file is listed in your .gitignore file so you don't accidentally check it into the repository.

config.json.defaults values

server

  • host: ip the server is listening on. This property can be used by tests instead of hardcoding "localhost" into the tests
  • port: port the server will listen on

database

  • host: ip of the database server
  • port: port number that the database server is listening on
  • db-num: for Redis databases, this is the number of the database that is used when doing queries and insertions

Adding New Configuration Settings

When you need to add a new configuration setting:

  1. Add it to your local config.json file
  2. Test it and make sure it works
  3. After making sure nothing is broken, add the new setting to the config.json.defaults and document the change on this page
  4. Commit your changes
Clone this wiki locally