1 min readSep 20, 2020
@ashishiiit01 server/index.js file is just used for starting the server and serving contents of public folder. You can't pass anything to React App. If you really want to pass something from index.js file then you need to developer your front-end using template engines like EJS/handlebars/pug. You can see how to do that in my this article: https://levelup.gitconnected.com/render-dynamic-content-in-nodejs-using-templates-a58cae681148?source=friends_link&sk=e4b7e0d64bb56da81c4295014b35b5ac