Make sure you have psql(postgres) installed Note: the script should create the database and seed it with data from the provided csv
bash ./src/seeder/seedScript.sh
npm install
npm run dev2
Terminal1 should run the conversion ts into js into a /dist
folder via the command below
npm run watch
Terminal2 should run the command below to call the /dist
folder
npm run dev
The server is deployed to https://server.tanvez.xyz You will need to use a GraphQL client( I use Altair GraphQL client) if you wanted to test out the endpoint point.
TODO ci/cd?
- local terminal -
- docker build :
docker build -t <accountname>:<version>
ex:docker build -t tanvez/gm-interview:1.1 .
- docker push :
docker push <accountname>:<version>
docker push tanvez/gm-interview:1.1
- docker build :
- ssh into droplet via ip
ssh root@<ip>
- pull docker image:
docker pull tanvez/gm-interview:1.1
- tag docker image:
docker tag tanvez/gm-interview:1.1 dokku/server:1.1
- deplot using dokku:
dokku deploy server 1.1
- pull docker image: