Application using Slim as REST API and front-end with twig and JQuery