#RETRIEVE DATA FROM MONGO DB AND DISPLAY IN VIEW
Note Data is displayed in it's raw format and not formatted. You can either run this project locally or on Google cloud run with instructions in the steps below.
Create and update .env file with the following information by copying the .env.test as .env
- Your database name as DB_NAME
- Your collection as COLLECTION_NAME
- Your mongo uri as MONGO_URI
To Run this project locally, cd into the project directory (mongodb_cloudrun) if not changed by you
npm install
npm run start
Ignore the step below if you are not going to use google cloud to build and deploy on cloud run. Replace with your Project's ID and with a name you want to give to your image. This step also assumes that you are running in an environment or CLI with google cloud sdk installed.
- Build the image
gclouds builds submit --tag gcr.io/<project-id>/<image-name>
- Deploy on cloud run
gcloud run deploy --image gcr.io/<project-id>/<image-name> --platform managed