an api for a checking application using hapi