fix #27, make api server configurable