https://github.com/thewasif/tech-news
Hacker News clone build with GraphQL (Apollo), MongoDB and ReactJS and deployed with Docker on Heroku
https://github.com/thewasif/tech-news
apollo docker docker-compose graphql mongodb nodejs react resource-list
Last synced: 3 months ago
JSON representation
Hacker News clone build with GraphQL (Apollo), MongoDB and ReactJS and deployed with Docker on Heroku
- Host: GitHub
- URL: https://github.com/thewasif/tech-news
- Owner: thewasif
- Created: 2020-10-27T07:03:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-22T15:52:50.000Z (over 5 years ago)
- Last Synced: 2026-01-03T16:25:55.538Z (6 months ago)
- Topics: apollo, docker, docker-compose, graphql, mongodb, nodejs, react, resource-list
- Language: JavaScript
- Homepage: https://tech-news-v1.netlify.app
- Size: 368 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

Tech News
Full Stack GraphQL (Apollo) web app with MongoDB and ReactJS
Open App
## About The Project

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](https://tech-news-api.herokuapp.com/)
👉🏽 [Application](https://tech-news-v1.netlify.app/)
## Local Installation
You can install this project locally by Docker Compose or by starting server and client separately.
First of all, clone the repo
```sh
git clone https://github.com/MuhammadWasif/tech-news.git
```
or with GitHub CLI
```sh
gh repo clone MuhammadWasif/tech-news
```
### Docker Compose
> Docker and Docker Compose must be installed on your computer
Go to root of project and execute
```sh
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)
### Individual Setup
If you do not want to use docker-compose, follow these steps:
#### Running the Server
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)
#### Running the Client
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**