MCPcopy
hub / github.com/srcbookdev/srcbook / configureServer

Function configureServer

packages/web/vite.config.ts:13–23  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

11 {
12 name: 'backend-watch-reload',
13 configureServer(server) {
14 const watcher = chokidar.watch('../api', {
15 persistent: true,
16 ignored: (file, stats) => !!stats?.isFile() && !file.endsWith('.mts'),
17 });
18 watcher.on('change', () => {
19 server.ws.send({
20 type: 'full-reload',
21 });
22 });
23 },
24 },
25 ],
26

Callers

nothing calls this directly

Calls 2

sendMethod · 0.80
onMethod · 0.45

Tested by

no test coverage detected