changed implementation on node server for getting posts and frontend as well