support port setting

For #20.