# Clone the repository
git clone https://github.com/Iuliana95/nest-book-library-api.git
cd nest-book-library-api
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Update database credentials in .env
DATABASE_URL
# Initiate Database
npx prisma migrate deploy
# Populate Database with Test Data
# Option 1: Run SQL setup file via command line
Run the setup.sql file to populate the database
psql -U $DATABASE_USER -d $DATABASE_NAME -h $DATABASE_HOST -p $DATABASE_PORT -a -f setup.sql
# Option 2: Manually run the SQL in pgAdmin4
1. Open pgAdmin4 and connect to your database.
2. Open a query window.
3. Copy the contents of setup.sql file.
4. Paste and execute the queries in the query window.
# Build Project ( generates Prisma Client and dist Folder )
npm run build
# Start the server
npm start # Start the application normally
npm start:dev # Start in development mode with watch mode
npm start:prod # Start in production mode