Edit on github

#Emit

The emit command emits an event to a serverless service

serverless emit -n my.event -d '{"foo":"bar"}'

# Shorthand
sls emit -n my.event -d '{"foo":"bar"}'

#Options

  • --name or -n The event name. Required.
  • --data or -d The event data
  • --path or -p Path to JSON or YAML file holding event data',
  • --url or -u Event Gateway address
  • --datatype or -t Data type for the event data. By default set to application/json

#Provided lifecycle Events

  • emit:emit

#Examples

#Emitting an Event to locally running Event Gateway

serverless emit -n my.event -d '{"foo":"bar"}'

#Emitting an Event to a remote Event Gateway

serverless emit -n foo.bar -d '{"foo":"bar"}' -u https://mygateway.com