Understanding CI & CD
A production pipeline has many steps, but they usually fall into two buckets: CI (Continuous Integration) and CD (Continuous Deployment / Delivery).
Use the same three commands from the Express app:
npm i
npm run test
npm run startWhat Happens in CI?
CI is about checking your code.
On every push:
npm iinstalls dependenciesnpm run testverifies behavior
If either fails, the change is not ready to go live.
What Happens in CD?
CD is about making your code live.
After CI passes:
npm run start(orpm2 restart) starts / restarts the app- Users can reach the new version
Complete Flow
Push Code
↓
CI → Install + Test
↓
CD → Start / Restart App
Easy Way to Remember
| Practice | Question |
|---|---|
| CI | Is the code correct? |
| CD | Is the code live? |
CI focuses on ensuring code quality; CD focuses on delivering that code to users.