MCPcopy Index your code
hub / github.com/editablejs/editable / startServer

Function startServer

packages/yjs-websocket/src/server/start.ts:61–73  ·  view source on GitHub ↗
(options: ServerOptions)

Source from the content-addressed store, hash-verified

59})
60
61export const startServer = (options: ServerOptions) => {
62 SERVER_OPTIONS_WEAKMAP.set(server, options)
63 const { host, port, persistenceOptions = { provider: 'leveldb' }, contentField } = options
64
65 if (persistenceOptions !== false) {
66 initPersistence(persistenceOptions, contentField)
67 }
68
69 server.listen(port, host, () => {
70 console.log(`running at '${host}' on port ${port}`)
71 })
72 return server
73}

Callers 2

server.tsFile · 0.90
index.tsFile · 0.85

Calls 1

initPersistenceFunction · 0.90

Tested by

no test coverage detected