like express api, add smarty/json handler, and a watch dog