cotrav_monorepo_package_creation_service_build_guide
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cotrav_monorepo_package_creation_service_build_guide [2026/01/19 12:09] – [Install Dependencies] pradnya | cotrav_monorepo_package_creation_service_build_guide [2026/01/27 08:38] (current) – [Cotrav Monorepo – Package Creation & Service Build Guide] pradnya | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Cotrav Monorepo – Package Creation & Service Build Guide ====== | ====== Cotrav Monorepo – Package Creation & Service Build Guide ====== | ||
| - | This document describes **how to create shared packages and build/run services** in the Cotrav monorepo. | + | This document describes **how to create shared packages and build/run services** in the Cotrav monorepo. |
| + | |||
| + | Git - [[https:// | ||
| + | |||
| ===== Repository Structure ===== | ===== Repository Structure ===== | ||
| Line 23: | Line 27: | ||
| </ | </ | ||
| + | |||
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| Line 43: | Line 48: | ||
| cmd | cmd | ||
| < | < | ||
| + | |||
| npm install | npm install | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Install Dependencies ===== | ||
| + | |||
| + | ==== Logger ==== | ||
| + | |||
| + | < | ||
| + | npm install pino | ||
| + | |||
| + | npm install -D @types/node | ||
| + | |||
| + | </ | ||
| + | |||
| + | Error | ||
| + | |||
| + | < | ||
| + | npm install -D @types/node | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Middleware ==== | ||
| + | |||
| + | < | ||
| + | npm install express | ||
| + | |||
| + | npm install -D @types/ | ||
| + | |||
| </ | </ | ||
| Line 52: | Line 86: | ||
| cmd | cmd | ||
| - | < | + | < |
| + | npm run build --workspace=packages/ | ||
| </ | </ | ||
| Line 59: | Line 95: | ||
| cmd | cmd | ||
| - | < | + | < |
| + | npm run build --workspace=packages/ | ||
| </ | </ | ||
| Line 85: | Line 123: | ||
| Service '' | Service '' | ||
| + | |||
| < | < | ||
| { | { | ||
| Line 106: | Line 145: | ||
| </ | </ | ||
| + | |||
| ==== Install Dependencies ==== | ==== Install Dependencies ==== | ||
| < | < | ||
| npm install | npm install | ||
| + | |||
| + | npm install -D typescript | ||
| npm install express dotenv jsonwebtoken bcryptjs swagger-ui-express swagger-jsdoc pino | npm install express dotenv jsonwebtoken bcryptjs swagger-ui-express swagger-jsdoc pino | ||
| Line 117: | Line 159: | ||
| Type deps | Type deps | ||
| - | < | + | < |
| - | @types/ | + | npm install -D |
| - | @types/ | + | @types/ |
| - | @types/ | + | @types/ |
| - | @types/ | + | @types/ |
| + | @types/ | ||
| @types/ | @types/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Build Services & Packages ==== | ||
| + | |||
| + | Execute below command on root folder " | ||
| + | |||
| + | < | ||
| + | npm run build | ||
| + | |||
| + | npm run typecheck | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Run auth service in dev ==== | ||
| + | |||
| + | < | ||
| + | npm run dev:auth | ||
| + | |||
| + | </ | ||
| + | ==== Clean all builds ==== | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | ==== Sanity check (must work) ==== | ||
| + | |||
| + | < | ||
| </ | </ | ||
cotrav_monorepo_package_creation_service_build_guide.1768824546.txt.gz · Last modified: by pradnya
