Skip to content

abhishekxix/workout-tracker-backend

Repository files navigation

Workout Tracker Backend

Install the project

npm install

Setup the following .env variables

  • PORT
  • COOKIE_SECRET
  • JWT_SECRET
  • MONGO_URI
  • JWT_VERIFICATION_LIFETIME
  • LOGIN_LIFETIME
  • MAILER_USER
  • MAILER_PASSWORD
  • TWILIO_SID
  • TWILIO_AUTH_TOKEN
  • TWILIO_SMS_PHONE_NUMBER
  • SERVER_URL

To connect to a local mongodb instance set MONGO_URI=mongodb://127.0.0.1:27017/workout-app

Build the code

npm run build

Start the server

npm start

Start the server in dev mode

npm run dev