add rest api impl in app.js for react components