https://github.com/if1live/hoshino
engine.io implementation for AWS Lambda
https://github.com/if1live/hoshino
engine-io engine-io-server serverless
Last synced: about 2 months ago
JSON representation
engine.io implementation for AWS Lambda
- Host: GitHub
- URL: https://github.com/if1live/hoshino
- Owner: if1live
- Created: 2022-09-16T18:32:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T00:02:18.000Z (over 1 year ago)
- Last Synced: 2025-02-02T18:14:48.973Z (4 months ago)
- Topics: engine-io, engine-io-server, serverless
- Language: TypeScript
- Homepage:
- Size: 616 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hoshino
engine.io v4 implementation for AWS Lambda.
based on [AWS WebSocket API](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html)* [engine.io-protocol](https://github.com/socketio/engine.io-protocol)
* [engine.io](https://github.com/socketio/engine.io)
## start
### prepare
```sh
pnpm install
```### deploy
```
# deploy backend
cd ./packages/backends
cp .env.sample .env
pnpm sls deploy
...✔ Service deployed to stack hoshino-main (265s)
endpoints:
wss://abcdefghij.execute-api.ap-northeast-1.amazonaws.com/main
ANY - https://abcdefghij.execute-api.ap-northeast-1.amazonaws.com
functions:
...
```
### test engine.io from script```sh
cd ./packages/backends
edit .env
WS_URL="wss://abcdefghij.execute-api.ap-northeast-1.amazonaws.com/main"pnpm ts-node-esm ./scripts/scenario_engine.ts
```### examples-latency
examples from engine.io
https://github.com/socketio/engine.io/tree/main/examples/latency```
cd ./packages/examples-latency
cp .env.sample .env
edit .env
VITE_WS_URL="wss://abcdefghij.execute-api.ap-northeast-1.amazonaws.com/main"pnpm dev
```