Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bid Service

Everything that happens once an opportunity is live. It's a bit of a catch-all: one service covers bids, proposals, notifications, and messages. Notifications and messages were meant to be their own services later on, but for now their routes live here.

  • Port: 3004
  • Routes: /api/bids, /api/proposals, /api/notifications, /api/messages

When something happens that a user should hear about (a new bid, a proposal update, a message), the controllers call the realtime emitter in src/util/realtime.ts, which posts the event to the gateway to fan out over WebSocket.

Running

npm install
npm run dev     # live reload
npm run build   # compile to dist/

Environment (.env)

PORT=3004
MONGO_URI=<mongodb connection string>
FRONTEND_URL=http://localhost:5173
GATEWAY_URL=http://localhost:3000
API_GATEWAY_URL=http://localhost:3000
OPPORTUNITY_SERVICE_URL=http://localhost:3003
JWT_ACCESS_SECRET=<shared with all services>
SERVICE_AUTH_SECRET=<shared with all services>

Folder layout

src/
  config/       db connection, plan entitlements
  controllers/  bid, proposal, notification, message handlers
  middleware/   auth, validation
  models/       Mongoose schemas
  routes/       one router per area
  util/         realtime emitter
  index.ts      entry point

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages