These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
A step-by-step series of examples that tell you how to get a development environment running:
-
Clone the repository:
git clone https://github.com/codepath/auth-express-react-prisma
-
Navigate to the project directory:
cd auth-express-react-prisma
-
Install dependencies:
For the server:
cd server npm install
For the client:
cd client npm install
-
Update the
.env
file in the server directory:You can use the
.env.example
file as a template. Fill in your database connection details and other environment variables as required. -
Database Setup:
Create a PostgreSQL database and note the connection details for use in the
.env
file.
To create the necessary tables in your database, run the migrations:
npx prisma migrate dev
To populate your database with initial data, you can use the seed script:
node seed.js
-
Start the server:
node server.js
The server will run on http://localhost:3000 by default.
-
Start the client:
In a separate terminal, navigate to the client directory and run:
npm start
The client will run on http://localhost:3001 by default.