Getting Started
Requirements
Section titled “Requirements”- Node.js (ESM modules,
type: "module") - MongoDB instance reachable via
MONGO_URI
Environment variables
Section titled “Environment variables”All variables below are required unless noted.
| Name | Required | Default | Description |
|---|---|---|---|
PORT | No | 4000 | Server port. |
MONGO_URI | Yes | - | MongoDB connection string. |
JWT_SECRET | Yes | - | Secret used to sign JWTs. |
FRONTEND_URL | Yes | - | Allowed CORS origin and base for email links. |
EMAILJS_SERVICE_ID | Yes | - | EmailJS service ID. |
EMAILJS_PUBLIC_KEY | Yes | - | EmailJS public key. |
EMAILJS_PRIVATE_KEY | Yes | - | EmailJS private key. |
EMAILJS_TEMPLATE_REGISTRO_ID | Yes | - | Template for registration emails. |
EMAILJS_TEMPLATE_OLVIDE_ID | Yes | - | Template for password reset emails. |
EMAILJS_FROM_NAME | No | - | Optional “from” name for EmailJS. |
Local development
Section titled “Local development”npm installnpm run devTo run in production:
npm startCORS behavior
Section titled “CORS behavior”CORS allows only the origin specified by FRONTEND_URL.