MCPcopy
hub / github.com/godaddy/terminus / startServer

Function startServer

example/redis/index.js:21–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21async function startServer () {
22 redisClient = new Redis({
23 port: 6379, // Redis port
24 host: '127.0.0.1' // Redis host
25 })
26
27 // OR
28 // redisClient = new Redis.Cluster(/* options */);
29
30 redisClient.on('connect', () => console.log('redis connected'))
31
32 terminus(http.createServer(app), {
33 logger: console.log,
34 signal: 'SIGINT',
35 healthChecks: {
36 '/healthcheck': onHealthCheck
37 },
38 onSignal
39 }).listen(3000)
40}
41
42startServer().catch(err => console.error('connection error', err.stack))

Callers 1

index.jsFile · 0.70

Calls 1

terminusFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…