Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Post using React & Apollo

1. 🔧 Setup Project

  1. Make sure that you have Node.js v8.15.1 or above installed.
  2. Clone this repo by running below command
    git clone https://github.com/mknmohit/react-apollo.git
  3. Move to the appropriate directory i.e cd react-apollo.
  4. Now follow below steps to setup/run server and client.

2. 🚀 Setup Server

  1. To install the Prisma CLI globally with Yarn, use the following command:
    yarn global add prisma
  2. Move inside the react-apollo/server directory by running the command cd server and run the following commands:
    yarn install
    yarn start

Note 1: If you want to interact with the GraphQL API of the server inside a GraphQL Playground, you can navigate to http://localhost:4000.

Note 2: If you face any problem while running up the server then you can follow the guideline on official documentation to migrate the db https://www.prisma.io/docs/concepts/components/prisma-migrate

3. 💻 Setup Client

Now that the server is running, you can start the React app as well. The commands need to be run in a new terminal tab/window inside the root directory react-apollo (because the current tab is blocked by the process running the server.

  1. Go back to root directory by running cd .../
  2. Run the following commands:
    yarn install
    yarn start
  3. You can now open your browser and use the app on http://localhost:3000.

Screenshots

No Blog Post Loading Posts Create Post Post Validation Blog Posts with pagination Single Post View Single Post Not Found 404 Page

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages