Typescript GRPC Boilerplate with CI/CD setup for kuberneates and envoy
$ sudo make
Test getUser Function
$ docker run -it --rm twitter-client node client get 1
Test createUser Function
$ docker run -it --rm twitter-client node client insert Yuvraj evalsocket hello@123
Test followUser Function
$ docker run -it --rm twitter-client node client follow 1 2
Test homeTimeline Function
$ docker run -it --rm twitter-client node client home 1
Test userTimeline Function
$ docker run -it --rm twitter-client node client timeline 1
Test createTweet Function
$ docker run -it --rm twitter-client node client tweet 1 hello
Configration : Change mysql configration (local)
How to start without docker :
$ #Run backend
$ npm install (Install npm dependencies)
$ npm run build (Build typescript)
$ npm run serve (start grpc server port 8080)
$ npm run dev (start grpc server on dev mode port 8080)
$ #Run client
$ cd client
$ export grpc_backend=35.243.198.252:80
$ npm install
$ node cleint get 1
How to start with docker :
$ # Run Docker container
$ docker build -t twitter-backend .
$ docker run -d --name twitter-backend twitter-backend
$ # Run envoy proxy
$ cd envoy
$ docker build -t front-envoy .
$ docker run -d --name front-envoy --link twitter-backend:twitter-backend -p 8080:8080 front-envoy
$ # Run exotel client
$ cd client
$ docker build -t twitter-client .
$ docker run -d --name twitter-client --env grpc_backend=35.243.198.252:80(APP ENGINE) twitter-client (If you are running backend locally the use 127.0.0.1:8080)
$ docker run -d --name twitter-client --env grpc_backend=35.221.233.116:80(Kuberneates envoy proxy) twitter-client (If you are running backend locally the use 127.0.0.1:8080)
How to start with kubctl : (optional)
$ # Run Docker container
$ docker build -t twitter-backend .
$ docker run -it --name twitter-backend -p 50051:8080 twitter-backend
$ Replace Variable name manully in k8s/k8s/cloudbuild/deployment.yml
$ kubectl apply -f k8s/k8s/cloudbuild/deployment.yml
To-DO :