Skip to content

HannahEA/social-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

362 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook-like social network that features Followers, Profile, Posts, Groups, Notifications, Chats

social-network Home page social-network user profile social-network group profile

How To Run 'social-network'

Run 'social-network' in Docker:

  1. To check docker status type:
systemctl status docker
  1. In VSC terminal access 'social-network' root folder and type:
systemctl start docker 
sudo docker-compose up
  1. When images have been built and the containers are running, go to browser url address and type:
http//localhost:3000

To exit Docker

  1. In VSC terminal type:
CTRL + C 
sudo docker-compose down
  1. To remove images type:
sudo docker image rm -f $(sudo docker image ls)
  1. To view all containers:
sudo docker ps -a
  1. To remove a container type:
sudo docker rm container ID e.g. 637a717eb106
  1. To stop docker type:
systemctl stop docker

Troubleshooting:

  1. If get error message: docker-compose-error-internal-booting-buildkit-http-invalid-host-header Run command to add user to the docker group:
sudo usermod -aG docker $USER
  1. If get Go error message: update the backend dockerfile to pull an updated go image from repository at https://hub.docker.com/_/golang

Run 'social-network' locally

  1. In the 'frontend' folder make an '.env' file that contains: REACT_APP_API_URL=http://localhost:8000 DANGEROUSLY_DISABLE_HOST_CHECK=true

  2. To install node files and create the package-lock.json and package.json files:

cd frontend
npm install react scripts
  1. Check that this line of code is contained within the sqlite.go OpenDatabase function:
sqliteDatabase, err := sql.Open("sqlite3", filename+"?_journal_mode=WAL")
  1. To run the GO back-end server:
cd backend
go run server.go
  1. To run the React front-end server, in a separate VSC terminal window type:
cd frontend
npm start

About

a Facebook like social network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors