refactor AppServer related functions
add instance-daemon
add daemonConfig