misa-j / social-network

Mini social network that I made as my first web app project.
http://46.101.189.55/login
MIT License
619 stars 136 forks source link

Trouble setting up the project #3

Closed DXGatech closed 4 years ago

DXGatech commented 4 years ago

Steps to reproduce on Ubuntu L18.04:

  1. use git to clone the project locally
  2. create variables.env in root directory, setting host to localhost:3000(since my nodejs starts at 3000)
  3. change the window.location.hostname variable to localhost:3000 as well
  4. change the proxy address to localhost:3000 This results in a bad request in Ubuntu with NodeJS v10 and a Request Header Too Long error in windows NodeJS v14 Am I doing something wrong?
misa-j commented 4 years ago

Project is based on create-react-app and its running on port 3000 so you cant have that and nodejs on same port also HOST should be your local ip on port 5000 if you choose that port for nodejs (its already running on port 5000) HOST=http://192.168.0.21:5000 and put same thing for window.location.hostname

misa-j commented 4 years ago

and you should run npm run dev in root directory

DXGatech commented 4 years ago

HI, I have solved the issue by correcting my MongoDB connection URL. Thank you for clarifying