server code init

set up invironment