Skip to content

Instantly share code, notes, and snippets.

@daffl
Last active January 31, 2024 09:24
Show Gist options
  • Save daffl/2793054f0fc33912d87ce4fe490487fb to your computer and use it in GitHub Desktop.
Save daffl/2793054f0fc33912d87ce4fe490487fb to your computer and use it in GitHub Desktop.
HTTP methods, service layer and real-time event mapping
HTTP method Service layer method Real-time event
GET /messages messages.find() -
GET /messages/1 messages.get(1) -
POST /messages messages.create(body) message created
PUT /messages/1 messages.update(1, body) message updated
PATCH /messages/1 messages.patch(1, body) message patched
DELETE /users/1 messages.remove(1, body) message removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment