Initial commits of server code.

except for the config file which contains connection password, only keep
it locally.