Facebook-like social network that features Followers, Profile, Posts, Groups, Notifications, Chats
- To check docker status type:
systemctl status docker- In VSC terminal access 'social-network' root folder and type:
systemctl start docker
sudo docker-compose up- When images have been built and the containers are running, go to browser url address and type:
http//localhost:3000- In VSC terminal type:
CTRL + C
sudo docker-compose down- To remove images type:
sudo docker image rm -f $(sudo docker image ls)- To view all containers:
sudo docker ps -a- To remove a container type:
sudo docker rm container ID e.g. 637a717eb106- To stop docker type:
systemctl stop docker- 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- If get Go error message: update the backend dockerfile to pull an updated go image from repository at https://hub.docker.com/_/golang
-
In the 'frontend' folder make an '.env' file that contains: REACT_APP_API_URL=http://localhost:8000 DANGEROUSLY_DISABLE_HOST_CHECK=true
-
To install node files and create the package-lock.json and package.json files:
cd frontend
npm install react scripts- Check that this line of code is contained within the sqlite.go OpenDatabase function:
sqliteDatabase, err := sql.Open("sqlite3", filename+"?_journal_mode=WAL")- To run the GO back-end server:
cd backend
go run server.go- To run the React front-end server, in a separate VSC terminal window type:
cd frontend
npm start

