its sample reactjs code for facebook post using nodejs,mongodb,graphql.
when you we press like,like will increase
This sample is made with React, Material UI, Graphql.feel free to fork and have fun with it.
1. cd server
2. npm install ----> To install node_modules
3. node server.js ------> to run server
4. Visit [localhost:4000](http://localhost:4000)
mutation {
createPost (username:"Mark Zuckerberg",imageurl:"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Mark_Zuckerberg_F8_2018_Keynote_%28cropped%29.jpg/220px-Mark_Zuckerberg_F8_2018_Keynote_%28cropped%29.jpg",posts:"This impressive paella is a perfect party dish and a fun meal to cook together with your guests. Add 1 cup of frozen peas along with the mussels, if you like")
{
id
username
imageurl
posts
}
}
1. cd client
2. npm install ----> install node_modules
3. npm start --> to run
4. Visit [localhost:3000](http://localhost:3000)