How can I deploy a Bun service?

tomast1337
HOBBY

5 months ago

I'm a bit lost on how to deploy a service running with Bun, as there is no Bun provider.

0 Replies

tomast1337
HOBBY

5 months ago

343fb4ef-05f1-497b-be99-54b3f9807532


5 months ago

bun is part of the node provider, and bun will automatically be detected when you have (and only have) a bun lock file


5 months ago

it's also a good practice to use a bun binary for it



tomast1337
HOBBY

5 months ago

I'm using a monorepo so the bun lock file is not on the root dir, was it supposed to be detected?


5 months ago

yeah it wouldn't detect it then, shared or isolated?


tomast1337
HOBBY

5 months ago

I don't get what you mean, My project is a pnpm workspace, and I'm introducing a new service separately from this work space that is planned to run with bun.

Our structure is like this:

root
  - packages
    - node service1
        - package.json
    - node service2
        - package.json
    - new bun service
        - package.json
        - bun.lockb
  - package.json

5 months ago

does the new bun service import stuff from other packages?


tomast1337
HOBBY

5 months ago

For now no


5 months ago

Then it's an isolated monorepo



5 months ago

shared monorepo**


5 months ago

lol


tomast1337
HOBBY

5 months ago

I'm not sure, for this specific service , it's completely isolated from the others, I will try o follow the guide


tomast1337
HOBBY

4 months ago

!g I change the project structure to a bun monorepo, I still don't get the bun option


How can I deploy a Bun service? - Railway Help Station