Back end for the web app version of Where's Waldo game. Built using Express and Prisma. Authentication handled via JWT. Using react-zoom-pan-pinch library for image manipulation.
- Node.js (v18 or higher)
- PostgreSQL database server
- npm or yarn
Before installation, make sure to:
- Create a PostgreSQL database for development
- Create a separate PostgreSQL database for testing
- Note down your database credentials for the
.envfile
# Clone the repository
git clone git@github.com:goran1010/waldo-back-end.git
# Navigate to project directory
cd waldo-back-end
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env with your database credentials and secret
# Initialize database and run migrations
npx prisma migrate dev# Start development server with hot reload
npm run dev
# Start production server
npm run start
# Run tests
npm run testDATABASE_URL: PostgreSQL URL for development databaseTEST_DATABASE_URL: PostgreSQL URL for test databaseSECRET: JWT secret keyPORT: Server port (defaults to 3000)
MIT