Skip to content

Hacker News clone build with GraphQL (Apollo), MongoDB and ReactJS and deployed with Docker on Heroku

Notifications You must be signed in to change notification settings

thewasif/tech-news

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Tech News

Full Stack GraphQL (Apollo) web app with MongoDB and ReactJS

Open App

About The Project

Tech News Home Page

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

Local Installation

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 Compose

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)

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

About

Hacker News clone build with GraphQL (Apollo), MongoDB and ReactJS and deployed with Docker on Heroku

Topics

Resources

Stars

Watchers

Forks