use json-resources as an api server