A simple javascript restful api