televet-vetdata-api
v1.0.0-prisma.6
Published
1. You need to have the aws-cli installed and your otto profile created
Downloads
3
Readme
Requirements
You need to have the aws-cli installed and your otto profile created
Node installed
Getting started
Steps to run it locally:
- Have the package installed by running npm i or if you prefer yarn then you can use yarn as well.
- Decode env variable by running sh decodeEnv.sh.
- After that check if local.env file was created or not. If not create one and add variables from .env to local.env
- Few things to make sure before you run.
- DATABASE_URL="postgresql://televet:passwordGoesHere@localhost:8080/prisma?schema=televet-core$dev&connection_limit=10" You can get password from aws console.
- Have a docker desktop installed as well. Using docker desktop makes it really easy.
- You need to have two thing running in docker db-sdk-prisma2 and redis. Instruction for these could be found in https://github.com/TeleVet/pims-api and https://github.com/TeleVet/db-sdk-prisma2.
- Open docker desktop and check if those two container are running or not.
- You should have cloned helper-script repo as well. If not do so. In terminal, inside helper-script run command that opens tunnel to local db.
- Globally install nodemon. This will prevent you from headache of running server after every change.
- Back to pims-api repo. In the terminal run nodemon. This should start your repo in http://localhost:4005/graphql.
- You can use apollo playground or if you want to use apollo sandbox you can do so. Sandbox allows click and add of query or mutation and there response value as well as variables.
- For those who want to try sandbox https://studio.apollographql.com/sandbox/explorer or just googling apollo sandbox should take you to right place.
Deployment
sh dockerBuild.shforce2
