Thanks to visit codestin.com
Credit goes to github.com

Skip to content

STP5940/elysiajs-app

Repository files navigation

ElysiaJS App

ElysiaJS, Bun, Prisma ORM, Mssql, Unit Test, CI/CD

🦊 How to Deploy ElysiaJs (YouTube)

To install dependencies:

bun install

Creates and applies database migrations:

bun prisma migrate dev --name init

Generates Prisma client only:

bun prisma generate --no-engine

Open Prisma Studio (GUI):

bun prisma studio

Run unit tests

bun test

To run the example application:

bun run dev

Build and Deploy to production:

bun run build
bun run start:prod

Deploy to production (PM2):

pm2 start ecosystem.config.cjs --env production

Commit types

🎉 Initial commit

👷 build:     — เปลี่ยนแปลงระบบ build หรือ dependencies เช่น npm เป็นต้น
✨ feat:      — ใช้สำหรับการเพิ่มฟีเจอร์ใหม่ลงมาใน Codebase ของเรา
🐛 fix:       — ใช้สำหรับการแก้ไข Bug ต่าง ๆ ใน Codebase
📚 docs:      — ประเภทนี้ใช้สำหรับการที่เราเปลี่ยนแปลงแค่เฉพาะ Document
🎨 style:     — เปลี่ยนแค่สไตล์ ไม่กระทบกับฟังก์ชัน
♻️ chore:     — การเปลี่ยนแปลงอื่นๆ ที่ไม่ได้แก้ไขไฟล์ src หรือ test
🔨 refactor:  — ปรับโครงสร้างโค้ด ทำความสะอาดโค้ด ให้ดีขึ้นโดยไม่เพิ่มฟีเจอร์ หรือแก้บั๊ก
🚀 perf:      — คำนี้มาจาก Performance หรือ การปรับปรุงประสิทธิภาพการทำงานนั่นเอง
🚨 test:      — การเปลี่ยนแปลงในส่วนของ Test ที่เราสร้างไว้ เช่น เพิ่ม Test-case
🏗️ ci:        — ปรับปรุง เปลี่ยนแปลง CI Config ของไฟล์ หรือ สคริปต์ เช่น Jenkins, GitLab CI
⏪ revert:    — ย้อนกลับ commit

Load Test Tools:

bun install autocannon -g
npx autocannon http://localhost:4001/v1/users -a 100 --header "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.xxx"

Deploy on Render

Build Command:

bun run build

Start Command:

bun run start:prod

🦊 Elysia Swagger 🌸

API Document By Swagger

About

🦊 Elysia: Simple MC (Model-Controller)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published