Best way to use bun for a js service?

Keeping the binary in git tracking seems janky...
13 Replies
Percy
Percy14mo ago
Project ID: N/A
Brody
Brody14mo ago
bun is detected when there is a bun lock file, if you have any other types of lock files node will be used
BenIsenstein
BenIsenstein14mo ago
Alright, I'm realising the bun.lockb is a lockfile for dependencies A little disorienting that it's not human readable, which made me think it was the binary itself
Brody
Brody14mo ago
indeed guess it just makes it faster for bun to read
BenIsenstein
BenIsenstein14mo ago
Still including nodejs in the build step..
BenIsenstein
BenIsenstein14mo ago
No description
BenIsenstein
BenIsenstein14mo ago
it is using bun, but why include node?
Brody
Brody14mo ago
there's still lots of deps that need node present even when using bun so it's a safe assumption to include it though it's odd that node came before bun, have you done any kind of nixpacks.toml stuff?
BenIsenstein
BenIsenstein14mo ago
Here's my railway.json:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"watchPatterns": ["**/*.ts","**/*.js","**/*.json"],
"nixpacksPlan": {
"phases": {
"setup": {
"nixPkgs": ["...","python38","gnumake","gcc"]
}
}
}
},
"deploy": {
"healthcheckPath": "/health",
"healthcheckTimeout": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"watchPatterns": ["**/*.ts","**/*.js","**/*.json"],
"nixpacksPlan": {
"phases": {
"setup": {
"nixPkgs": ["...","python38","gnumake","gcc"]
}
}
}
},
"deploy": {
"healthcheckPath": "/health",
"healthcheckTimeout": 10
}
}
Brody
Brody14mo ago
okay looks fine so does it work now that you have the bun lock file?
Dayblox
Dayblox14mo ago
You can install the bun VSCode extension in order to visualize the lockfile
BenIsenstein
BenIsenstein14mo ago
Yeah it works THanks!
Brody
Brody14mo ago
no problem!
Want results from more Discord servers?
Add your server