Next.js Discord

Discord Forum

Serve Next Js witn BunJs

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
I've a plan to run rabbit mq and next js in single project

goals is next js can pub / sub on rabbitmq

so to start the consumer, i should use custom server in next js, but how to custom our next js with Bun?

i've try using node js with express, it's work as well, but i want to use bun insted of node js

1 Reply

@American black bear I've a plan to run rabbit mq and next js in single project goals is next js can pub / sub on rabbitmq so to start the consumer, i should use custom server in next js, but how to custom our next js with Bun? i've try using node js with express, it's work as well, but i want to use bun insted of node js
nextjs as of last time i checked [fn 1] uses APIs that are not implemented by bun yet, so using nextjs in the bun runtime will break in some occasions. if you are willing to accept that risk, simply run bun --bun start – the --bun flag enforces the bun runtime

[fn 1] last time i checked is a few months ago already so there is a chance it is a bit outdated