What environment variables does the DevTinder backend need?
PORT (e.g., 3000), MONGODB_URI (connection string for MongoDB), JWT_SECRET (for signing JWT tokens), NODE_ENV (development or production), and CLIENT_URL (for CORS configuration with the frontend).
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Setting Up the DevTinder Backend Repository Clone, Install, and Configure
Clone the repository with git clone, run npm install to install dependencies, copy .env.example to .env and fill in MongoDB URI and JWT secret, then run npm run dev to start the Express server.
Either works. Local MongoDB is faster and doesn't require internet. MongoDB Atlas is easier to set up (no local install) and is free for small projects. Use Atlas if you want a managed cloud database.
After starting the server, use curl or Postman to hit POST /api/signup with a JSON body containing firstName, lastName, email, and password. A 201 response with user data and a Set-Cookie header confirms it works.
Still have questions?
Browse all our FAQs or reach out to our support team
