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:12] – [Root Workspace Setup] 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 42: | Line 47: | ||
| cmd | cmd | ||
| - | |||
| < | < | ||
| + | |||
| npm install | npm install | ||
| </ | </ | ||
| + | |||
| ===== Install Dependencies ===== | ===== Install Dependencies ===== | ||
| ==== Logger ==== | ==== Logger ==== | ||
| - | < | + | < |
| + | npm install pino | ||
| npm install -D @types/node | npm install -D @types/node | ||
| + | </ | ||
| + | |||
| + | Error | ||
| + | |||
| + | < | ||
| + | npm install -D @types/node | ||
| </ | </ | ||
| Line 60: | Line 73: | ||
| ==== Middleware ==== | ==== Middleware ==== | ||
| - | < | + | < |
| + | npm install express | ||
| npm install -D @types/ | npm install -D @types/ | ||
| - | |||
| </ | </ | ||
| - | |||
| ==== Build Package ==== | ==== Build Package ==== | ||
| Line 74: | Line 86: | ||
| cmd | cmd | ||
| - | < | + | < |
| + | npm run build --workspace=packages/ | ||
| </ | </ | ||
| Line 81: | Line 95: | ||
| cmd | cmd | ||
| - | < | + | < |
| + | npm run build --workspace=packages/ | ||
| </ | </ | ||
| Line 107: | Line 123: | ||
| Service '' | Service '' | ||
| + | |||
| < | < | ||
| { | { | ||
| Line 128: | 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 147: | Line 167: | ||
| @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.1768824742.txt.gz · Last modified: by pradnya
