MCPcopy
hub / github.com/redwoodjs/graphql / getAPIHost

Function getAPIHost

packages/api-server/src/cliHelpers.ts:3–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { getConfig } from '@redwoodjs/project-config'
2
3export function getAPIHost() {
4 let host = process.env.REDWOOD_API_HOST
5 host ??= getConfig().api.host
6 host ??= process.env.NODE_ENV === 'production' ? '0.0.0.0' : '::'
7 return host
8}
9
10export function getAPIPort() {
11 return process.env.REDWOOD_API_PORT

Callers 4

bothServerFileHandlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
resolveOptionsFunction · 0.90

Calls 1

getConfigFunction · 0.90

Tested by

no test coverage detected