Changed entry point to contain a message and return json