server: add read configuration file function

Change-Id: I6a3fe8208219a18e0a67b791dedb6b93d5e9caab