Full Stack GraphQL (Apollo) web app with MongoDB and ReactJS
Open App
This project is a Full Stack Application built with GraphQL with Apollo Server and Apollo Client. It uses MongoDB as database while hosting database on MongoDB Atlas. It uses React as UI Library. Application is containerized with Docker and these containers are deployed to Heroku
👉🏽 GraphQL API
👉🏽 Application
You can install this project locally by Docker Compose or by starting server and client separately.
First of all, clone the repo
git clone https://github.com/MuhammadWasif/tech-news.git
or with GitHub CLI
gh repo clone MuhammadWasif/tech-news
Docker and Docker Compose must be installed on your computer
Go to root of project and execute
docker-compose up
It will take time for the first time but when containers are ready you can start development.
You can access servers at
React Client: http://localhost:3000/
GraphQL Server: http://localhost:5000/
(You can change environment variables in docker-compose.yml
file)
If you do not want to use docker-compose, follow these steps:
1: Go to /server
and replace .env.example
with .env
.
2: Make sure to change MONGO_URI
variable to your database srv string.
3: Run npm install
to install the packages.
4: Run npm run dev
and GraphQL server will start on http://localhost:5000/
(Make sure that MongoDB is running and your database is accessible through SRV String)
1: Goto /client
directory.
2: Run npm install
to install packages.
3: Run npm start
and React server will on http://localhost:3000/
If you have any kind of problem, my Discord username is muhammadwasif#0612