Create full stack apps with React and Express. Run your client, server and do a restart of your dump db to have a full-stack project working in minutes
-
Go to your source directory in your terminal and run the command
git clone https://github.com/Yosolita1978/React-Express-PairProgramming.git NAMENEWDIRECTORY
!You will something like this in your terminal. -
To restore the DB dump file that the project already contain, just run the command
psql -U postgres -f db.sql
. Make sure that you have your Postgres password on hand. The psql console will ask you for your password. -
To clean your folder from the owner git, run the command
rm -rf .git
-
Run the command
git init
to start your git repository -
Go to the server folder in the project (
cd server
) and run the commandnpm install
-
Inside your server folder, create an .env file with
touch .env
-
Inside your server folder, open the file
.env.example
and copy the file there. -
Inside your .env file, paste the string from .env.example and change the variables with the values from the project. For this template, don't change the name of your db.
-
Inside your server file: run the command
psql -U postgres -f db.sql
to restore the DB from the file db.sql -
Go to the cliente folder (
cd .. and cd client
) and run the commandnpm start
-
Both server should run now with
npm start
-
Go to localhost:3000 and you should see something like this !You will something like this in your terminal.