aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/install/custom-registry.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-07-31 12:20:23 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-31 12:20:23 -0700
commit404b90badc5856a74c06d04062c850003e28fed5 (patch)
tree7954623cf4a792db612d0bb229a227c2ff1e9fd8 /docs/guides/install/custom-registry.md
parent67599f97adc77141331a5f4fc39e4d058dc70b2a (diff)
downloadbun-404b90badc5856a74c06d04062c850003e28fed5.tar.gz
bun-404b90badc5856a74c06d04062c850003e28fed5.tar.zst
bun-404b90badc5856a74c06d04062c850003e28fed5.zip
Add ecosystem guides (#3847)
* Add ecosystem guides * Update titles * Rename stric * Add unlink and fetch guides * Add formdata guide * Tweak title * Moar
Diffstat (limited to 'docs/guides/install/custom-registry.md')
-rw-r--r--docs/guides/install/custom-registry.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/guides/install/custom-registry.md b/docs/guides/install/custom-registry.md
new file mode 100644
index 000000000..64b3cf76b
--- /dev/null
+++ b/docs/guides/install/custom-registry.md
@@ -0,0 +1,30 @@
+---
+name: Override the default npm registry for bun install
+---
+
+The default registry is `registry.npmjs.org`. This can be globally configured in `bunfig.toml`.
+
+```toml#bunfig.toml
+[install]
+# set default registry as a string
+registry = "https://registry.npmjs.org"
+
+# if needed, set a token
+registry = { url = "https://registry.npmjs.org", token = "123456" }
+
+# if needed, set a username/password
+registry = "https://username:password@registry.npmjs.org"
+```
+
+---
+
+Your `bunfig.toml` can reference environment variables. Bun automatically loads environment variables from `.env.local`, `.env.[NODE_ENV]`, and `.env`. See [Docs > Environment variables](/docs/cli/run#environment-variables) for more information.
+
+```toml#bunfig.toml
+[install]
+registry = { url = "https://registry.npmjs.org", token = "$npm_token" }
+```
+
+---
+
+See [Docs > Package manager](/docs/cli/install) for complete documentation of Bun's package manager.