Mayank0255 / Stackoverflow-Clone-Frontend

Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize :globe_with_meridians:
https://stackoverflow-clone-client.vercel.app
MIT License
546 stars 209 forks source link

Trouble Setting up MySQL #35

Closed priyanshu-kun closed 3 years ago

priyanshu-kun commented 3 years ago

Hey! I'm facing issues to setup database locally cause I never use SQL database before ''m only use mongodb But I know mySQL syntax. Will you tell me step by step how do I setup db locally?

Mayank0255 commented 3 years ago

Okay, so,

  1. Install MySQL to your local machine.
  2. Check if you are able to connect to the mysql client with your credentials or not.
  3. If you are able to connect to it then create a .env file in the project folder and set it up in the same format as in .env.example. Add your personal mysql credentials to their respective places in your .env file.
  4. After that just follow the instructions mentioned in guidelines written.

If you have trouble running the .sql scripts then just open up your mysql client and then run the two scripts with their respective file paths like

source <file path>
Mayank0255 commented 3 years ago

@priyanshuSharma-WebDev did this help?

ddsuhaimi commented 3 years ago

i have some trouble with running the backend ( i think it has something to do with the env). What would be the host value in the .env for example? How do i know what mine is?

edit: nvm, i set it to 127.0.0.1 and it now works without error

Mayank0255 commented 3 years ago

Great to hear that, though it can also be 'localhost'

Mayank0255 commented 3 years ago

@priyanshuSharma-WebDev should I close the issue then?

priyanshu-kun commented 3 years ago

Yeah! It's work, Now I'm ready to familiarize myself with codebase.

priyanshu-kun commented 3 years ago

One more thing! Have you ever try to make a real time collaboration webapp ex: google docs cause I want to make something like this?

Mayank0255 commented 3 years ago

Yeah! It's work, Now I'm ready to familiarize myself with codebase.

Great, I am glad to hear that and am looking forward to some really cool contributions from your side 😄.

One more thing! Have you ever try to make a real time collaboration webapp ex: google docs cause I want to make something like this?

I haven't done anything like that up till now, though I have worked a little with Web Sockets for a chat application