add rest api json and index route render html