To get started, make sure you have Docker installed and enabled kubernates on your system, and then clone this repository.
Skaffold handles the workflow for building, pushing and deploying your application, allowing you to focus on what matters most: writing code.
setup skaffold Installing skaffold
install ingress-nginx by running
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.4.0/deploy/static/provider/cloud/deploy.yaml
kubectl create secret generic jwt-secret --from-literal=JWT_KEY=my-secret-key
add vouchers.dev domain to hosts files into your machine
- windows =>
C:\Windows\System32\drivers\etc\hosts
- mac / linux =>
nano /etc/hosts
Next, navigate in your terminal to the directory you cloned this, and spin up the containers for the web server by running
skaffold dev
NOTE create new environment in postman with domain variable has values: https://vouchers.dev make it https to store cookies
Voucher Pool App Service app collection
You can access your application via localhost, if you're running the containers directly https://vouchers.dev
To get started, make sure you have NODE installed on your system,.
Next, navigate in your terminal to the directory you cloned this, run command below:
npm install && npm install --save-dev
- running tests:
- users:
cd auth && npm run test
- vouchers:
cd vouchers && npm run test
- redeem:
cd redeem && npm run test
** Note our running test outside the container to prevent container to upload large libraries like: mongodb-memory-server
every time change package.json
mongodb-memory-server
- architect ,scalable app using collections of services handle by kubernets.
- using load balancing is called nginx-ingress.
- communication between services using a lighting-fast event bus by using nats-streaming.
- share reusable code between multiple express services using custom. NPM Package to prevent repeating code common package.
- implemented JWT based security in a test Core Web API REST project
- Sign In
- Sign Up
- Me
- Logout
- Create
- Update
- Show
- Get All
- Create
- Update
- Show
- Get All
- emits voucher:created event when create new vouceher
- emits voucher:updated event when update voucher
- redeem voucher
- check if voucher is expired
- check if voucher is already used.
- emits redeem:created event when redeem created
- listen voucher:creaetd evnet
- listen voucher:updated evnet
share reusable code between multiple express services using custom. NPM Package to prevent repeating code
- middlewares
- events
- errors
- publish lib on npm packages