This is the backend for upload and storage packages in hostify.
- heroku account
- MongoDB Atlas account
- Create a cluster in MongoDB Atlas. An M0 group is sufficient in most cases.
- Create a database user in Atlas. They must have the database read and write permission.
- Get the connection string from the database and insert the username and password of the created one. It should look something like this:
mongodb+srv://username:[email protected]@cluster0.ssezy.mongodb.net/hostifypackagedb?retryWrites=true&w=majority
. - Save this connection string in heroku Config Vars with name
MONGODB_URI
and value keyMongoURI
. - create an environment variable called
SECRET_JWT
and add your JWT token
- Install
heroku
CLI. - Sign in to
heroku
and created your dyno cluster
then run the command
git push heroku master
note: remember to have the aforementioned environment variables already configured before deploy the application
To run the backend locally, make sure you have node js and mongoDB compass installed. Then run:
npm run dev