Operations
This package is an HTTP NestJS service. Day-to-day scripts:
| Script | Purpose |
|---|---|
npm run start:dev | Nest watch mode (local development) |
npm run build | Compile to dist/ |
npm test | Jest unit tests |
npm run start:prod | node dist/main |
npm start | nest start |
macOS launchd
A sample LaunchAgent plist ships at notification-service/ops/com.notification-service.plist.
| Key | Behavior |
|---|---|
Label | com.notification-service |
RunAtLoad | true |
KeepAlive | true |
ThrottleInterval | 30 seconds |
WorkingDirectory | package root |
StandardOutPath / StandardErrorPath | under data/ |
The checked-in plist points ProgramArguments at a specific Node binary and
dist/src/main.js path — edit those absolute paths for your machine before loading.
Build
cd notification-service
npm run buildLoad the agent (after editing paths)
cp ops/com.notification-service.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.notification-service.plistUnload
launchctl unload ~/Library/LaunchAgents/com.notification-service.plistLogs default to data/notification-service.log and data/notification-service.err.log in the
sample plist. Ensure ./data exists and .env is present in WorkingDirectory.
Related
Last updated on