import { Callout } from '@theguild/components'

# Node.js

Node.js is the most common runtime for JavaScript.

If you have Node.js environment, we highly recommend to use Hive Gateway with the CLI as described
in the [introduction](/docs/gateway). If you really want to use the runtime in a customized way. You
can use the `createGatewayRuntime` function from `@graphql-hive/gateway-runtime` package.

## Hive Gateway CLI

You can follow the introduction page directly to use Hive Gateway CLI. [See here](/docs/gateway)

## Hive Gateway Runtime (advanced-only)

Use this method only if you know what you are doing. It is recommended to use Hive Gateway CLI for
most cases.

```ts
import { createServer } from 'http'
import { createGatewayRuntime } from '@graphql-hive/gateway-runtime'

const serveRuntime = createGatewayRuntime(/* Your configuration */)
const server = createServer(serveRuntime)
server.listen(4000, () => {
  console.log(`Server is running on http://localhost:4000`)
})
```
