mirror of
https://github.com/zoriya/elysia.git
synced 2026-08-15 18:44:25 +00:00
15 lines
249 B
TypeScript
15 lines
249 B
TypeScript
import { Elysia, t } from '../src'
|
|
import { z } from 'zod'
|
|
import { req } from '../test/utils'
|
|
|
|
export const app = new Elysia()
|
|
.ws('/', {
|
|
open(ws) {
|
|
ws.subscribe('a')
|
|
},
|
|
message(a) {
|
|
console.log(a.subscriptions)
|
|
}
|
|
})
|
|
.listen(3000)
|