MCPcopy Create free account
hub / github.com/TanStack/db / start

Function start

examples/react-native/shopping-list/server/index.ts:510–527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

508})
509
510async function start() {
511 try {
512 await ensureDb()
513
514 app.listen(PORT, '0.0.0.0', () => {
515 console.log(`Server running at http://0.0.0.0:${PORT}`)
516 console.log(`For Android emulator API: http://10.0.2.2:${PORT}`)
517 console.log(`For iOS simulator API: http://localhost:${PORT}`)
518 console.log(`Electric shape endpoint: http://localhost:3003/v1/shape`)
519 })
520 } catch (error) {
521 console.error(`Failed to start shopping-list server`, error)
522 console.error(
523 `Did you run 'pnpm db:up' in examples/react-native/shopping-list?`,
524 )
525 process.exit(1)
526 }
527}
528
529void start()

Callers 1

index.tsFile · 0.70

Calls 1

ensureDbFunction · 0.85

Tested by

no test coverage detected