Create an enterprise social network with REACT and SQL
- Connect to the mySQL server of your choice
- Create a new schema (for example : groupomania)
- Edit db_config.js file in the config folder with the username and the password which you use to connect to your database, then modify the name of the database by the name of the schema that you have previously created
- Create a file named .env in the config folder
- Open the .env file and add the lines:
- PORT=Port number of your choice
- SECRET_KEY=Random sequence of characters of your choice
- ADMIN_USERNAME=admin username of your choice
- ADMIN_EMAIL=admin email of your choice
- ADMIN_PASSWORD=admin password of your choice
- Open the terminal from the server folder and type the following command:
- npm install package.json
- Type npm start from the server folder in the terminal to start the server
- Open the terminal from the client folder and type the following command:
- npm install package.json
- Create a file named .env at the root of the client folder
- Open the .env file and add the line :
- REACT_APP_API_URL=Your URL based on the port you have chosen for the server (ex: http://localhost:8800)
- Type npm start from the client folder in the terminal to start the react app