Skip to content

Latest commit

 

History

History
executable file
·
57 lines (40 loc) · 1.53 KB

File metadata and controls

executable file
·
57 lines (40 loc) · 1.53 KB

facebookpost-reactjs-material-ui-graphql

its sample reactjs code for facebook post using nodejs,mongodb,graphql.
when you we press like,like will increase


facebook post

This sample is made with React, Material UI, Graphql.feel free to fork and have fun with it.


Server

1. cd server
2. npm install ----> To install node_modules
3. node server.js ------> to run server
4. Visit [localhost:4000](http://localhost:4000)



localhost:4000 will show Graphql


enter like this to create a post in 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

}
}

Client


1. cd client
2. npm install ----> install node_modules
3. npm start --> to run
4. Visit [localhost:3000](http://localhost:3000)