Skip to main content

bud.serve

Configure the development server.

Server information

By default bud.js will serve at the following address:

PropertyValue
hostlocalhost
port3000

If port 3000 is already used a new port will be dynamically selected.

Specifying server address

danger

You will need to handle resolving custom domains yourself if you don't want to use localhost.

Specify a different port:

bud.config.js
bud.serve(3010)

Specify an address as a string:

bud.config.js
bud.serve('http://example.test:3000')

Specify an address with a node URL object:

bud.config.js
bud.serve(new URL('http://example.test:3000'))

Serve over https:

bud.config.js
bud.serve({
host: new URL('example.test'),
cert: '/path/to/example.test.crt',
key: '/path/to/example.test.key',
})