StaticDirectory and TemplateDirectory are not default to the conf.json directory and added existence check for them
Moved database init to main.go and added a quick DB test