vimo backend microservice
Install locally
cd vimo-server
virtualenv -p python3.9 venv
source venv/bin/activate
pip install -r requirements.txtRun locally
python main.py- Set allowed origins in the
ALLOW_ORIGINSenv variable in the .env file. This variable determines which origins are allowed to access the API. For example, if you want to allow the originhttps://vimo.janelia.org, set the variable toALLOW_ORIGINS='["https://vimo.janelia.org"]'. To allow any origin, set the variable toALLOW_ORIGINS='["*"]'. - Create Firestore database in native mode and create a collection named 'sketches'.
- Create a service account in IAM & Admin and assign Firebase Admin role. Create keys JSON
vimo-server-firestore-credentials.jsonin IAM & Admin > Service Accounts > Actions menu on the new account. - Deploy to Google Cloud Run
gcloud run deploy vimo-server --source . --allow-unauthenticatedTest endpoints
https://vimo-server-janelia-3jagpvnfya-uc.a.run.app/count/motif={"nodes":[{"label":"A","properties":null,"index":0,"position":["Point",44.24219,321.60156]},{"label":"B","properties":null,"index":1,"position":["Point",159.24219,88.60156]},{"label":"C","properties":null,"index":2,"position":["Point",295.24219,228.60156]}],"edges":[{"label":"A -> C","properties":null,"index":0,"indices":[0,2],"tree":null},{"label":"C -> B","properties":null,"index":1,"indices":[2,1],"tree":null},{"label":"B -> A","properties":null,"index":2,"indices":[1,0],"tree":null}],"dimension":{"width":375.6640625,"height":391.1953125}}