Skip to content

Return Types

Beyond JSX, you can directly return text, number, or json content.

Returns a text/plain response. Numbers are converted to strings.

export const GET = () => 'Ok'
export const GET = () => 42

Returns an application/json response.

export const GET = () => {
return {
"message": "Welcome to xink!"
}
}