Skip to content

sunyrora/GraphQLProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a React app with GraphQL using express-graphql server, MongoDB and apollo-client.

View Deom page

You can add, delete and update the data.

To run this project,

1. create .env file in the project root(see the image below)

and define variables like example below.


NODE_ENV='development'
PORT=4000
MONGO_URI='Your MongoDB URL'

NODE_ENV and PORT is optional but MONGO_URI is necessary.

2. create another .env under the frontend folder.

and define REACT_APP_GRAPH_HOST variable.


REACT_APP_GRAPH_HOST='your server adress/graphql'

Normally this value will be set to "http:localhost:[PORT]/graphql", while you're developing. But once you deploy your server, you need to change this value with the real adress(you can set the values on the hosting provider's site if they provid this function).

  1. npm install

run this code in the project root, and under frontend folder too.

  1. npm run dev

For development, it will run both of the server and the client.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •