api code along with nginx configuration working