API for React-Times
npm run dev
starts dev with nodemon. Aconfig
folder withdev.env
is needed, similar values with.env.example
npm run test
ornpm t
runs tests in watch modenpm run start
runs server.
- PORT: Port to run the server, default is 3000 if not provided.
- MONGODB_URL: MongoDB connection URL. For production, it is the connection string via application and for local, it is the string to connect to MongoDB Compass
- JWT_SECRET: Unique string to hash the password. More information about that can be found in JWT Docs.
- SEND_GRID_API_KEY: API key to be able to send emails when user registers and deletes account (SendGrid API Docs).
- SEND_GRID_EMAIL: Email address signed up to SendGrid to send emails to users.
- SEND_GRID_REGISTER_TEMPLATE_ID and SEND_GRID_DELETE_TEMPLATE_ID: Template ID for SendGrid to understand which template to use (docs). Templates can be found under
/src/sendgrid
- API_URL: API URL in production.