You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This template includes a local development server (`server.js`) that provides:
104
+
- Static file serving for your application
105
+
- WebSocket support for real-time messaging
106
+
- A REST API for triggering client-side alerts
107
+
108
+
### Starting the Server
109
+
110
+
```bash
111
+
node server.js
112
+
```
113
+
114
+
The server will start on `http://localhost:3000` by default.
115
+
116
+
### WebSocket Messaging API
117
+
118
+
The server provides a `POST /message` endpoint that allows you to send real-time messages to connected clients. This can be used to signal changes in the client during events like "Run" or "Submit". When a message is sent, the preview window with the application open will display an alert with the message.
119
+
120
+
It uses the `ws` package, so if you want to use it, install `ws`.
0 commit comments