@ws

@ws section defines Web Socket handlers

Example

This .arc file defines both HTTP and Web Socket endpoints:

@app
testapp

@ws
# no other config required

@http
get /

Running npx create generates the following functions:

/
|-src
| |-http
| | '-get-index/
| '-ws
|   |-ws-connect/
|   |-ws-default/
|   '-ws-disconnect/
'-.arc

Next: arc.events.publish