write app scripts before server start