This is a project to testing purposes. Delivered to Deall SejutaCita company.
Just visit at sejutacita.id
- SejutaCita Project Test
- Node.js as backend language
- Typescript as transpiler for the code
- Express as web framework
- Postgres as database
- Docker as containerization
- Swagger as documentation
- Jest as testing framework
- SWC as code minifier
- ESLint as code linter
- Prettier as code formatter
- Husky as git hooks
- Winston as logging framework
- First of all, copy the
example
file to.env.development.local
file - Fill the local environment variables with the correct values
- Install the dependencies with
npm install
- Create a database with value that already filled from env file
- Run migrations with
npm run migrate
- And last but not least, run the server with
npm run dev
as development mode
- First of all, copy the
example
file to.env.test.local
file - Fill the local environment variables with the correct values
- Install the dependencies with
npm install
if you don't have any dependencies installed - Create a database with value that already filled from env file
- Run migrations with
npm run migrate:test
- And last but not least, run the test
npm run test
with jest as test mode
- First of all, copy the
example
file to .env.production.local file - Fill the local environment variables with the correct values
- Run and deploy with current exist Dockerfile and Docker Compose file (for test you can use Railway)
- First of all, copy the
example
file to .env.production.local file - Use Docker Desktop Kubernetes or you can use kinD to run the cluster
- Docker Desktop Kubernetes
- KinD
- create a cluster with
kind create cluster --file cluster-config.yml
. The default cluster name iskind
- create a cluster with
- build your docker image with
docker image build -t YOUR_DOCKERHUB_USERNAME/sejutacita:latest .
- or use my image at my docker repo here
- create a deployment or pod with
kubectl apply -f pod.yml
- create a service with
kubectl apply -f service.yml
- check all the pod and service with
kubectl get all
and make sure status isRunning
- Access your project with port from kind cluster master port (example is 30000). Then run with localhost:30000
Apply pod and service with kubectl apply -f pod.yml
and kubectl apply -f service.yml
Kube ctl get all pods & services
Access the project at index API
Access the project at Swagger API Docs Page
As seeding data, use the following credentials:
Admin:
Username: admin
Password: password
User:
Username: user
Password: password
you can acess the api at visit at sctest.afif.dev
Visit at sctest.afif.dev/api-docs
Hello there 👋🏻, my name is Afif Abdillah Jusuf and I'm a software engineer.
I'm currently working as a Full Stack Developer.
Graduated from Politeknik Elektronika Negeri Surabaya as Associate Degree in Informatics Engineering.
Nice to meet you.
Visit my personal site at afif.dev
This project is open-sourced software licensed under the MIT license.