You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone the repository
git clone https://github.com/iibrahimx/autolease-api.git
cd autolease-api
# Install dependencies
npm install
# Create .env file from example
cp .env.example .env
# Run database migrations
npm run migration:run
# Start development server
npm run dev
Environment Variables
Copy .env.example to .env and fill in your values:
# ApplicationNODE_ENV=developmentPORT=3001APP_NAME=AutoLeaseAPP_URL=http://localhost:3001FRONTEND_URL=http://localhost:5173# DatabaseDB_HOST=localhostDB_PORT=5432DB_USERNAME=postgresDB_PASSWORD=your_passwordDB_NAME=autolease# JWTJWT_ACCESS_SECRET=your_access_secretJWT_REFRESH_SECRET=your_refresh_secretJWT_ACCESS_EXPIRATION=900JWT_REFRESH_EXPIRATION=604800# Google OAuthGOOGLE_CLIENT_ID=your_google_client_idGOOGLE_CLIENT_SECRET=your_google_client_secretGOOGLE_CALLBACK_URL=http://localhost:3001/api/auth/google/callback# CloudinaryCLOUDINARY_CLOUD_NAME=your_cloud_nameCLOUDINARY_API_KEY=your_api_keyCLOUDINARY_API_SECRET=your_api_secret# StripeSTRIPE_SECRET_KEY=sk_test_your_keySTRIPE_PUBLISHABLE_KEY=pk_test_your_keySTRIPE_WEBHOOK_SECRET=whsec_your_secret# Email (SMTP)SMTP_HOST=smtp.gmail.comSMTP_PORT=587SMTP_USER=your_email@gmail.comSMTP_PASS=your_app_password
Running the Application
# Development
npm run dev
# Type check
npm run typecheck
# Build for production
npm run build
# Start production server
npm start
Testing
# Run tests
npm test# Run tests with coverage
npm run test:coverage