You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
modules/nodejs
Michael Smith 438c904567
chore: cleanup all test files (#293)
## Changes made
- Removed all unused imports, and made sure type imports were labeled
correctly
- Updated all comparisons to be more strict
- Simplified loops to remove unneeded closure functions
- Removed all explicit `any` types
- Updated how strings were defined to follow general TypeScript best
practices

## Notes
- We definitely want some kind of linting setup for this repo. I'm going
to bring this up when Blueberry has its next team meeting next week
10 months ago
..
README.md chore: bump version to 1.0.10 in README.md files (#201) 1 year ago
main.test.ts chore: cleanup all test files (#293) 10 months ago
main.tf Fix `nodejs`: Create directory before executing script (#183) 1 year ago
run.sh Fix `nodejs`: Create directory before executing script (#183) 1 year ago

README.md

display_name description icon maintainer_github verified tags
nodejs Install Node.js via nvm ../.icons/node.svg TheZoker false
helper

nodejs

Automatically installs Node.js via nvm. It can also install multiple versions of node and set a default version. If no options are specified, the latest version is installed.

module "nodejs" {
  source   = "registry.coder.com/modules/nodejs/coder"
  version  = "1.0.10"
  agent_id = coder_agent.example.id
}

Install multiple versions

This installs multiple versions of Node.js:

module "nodejs" {
  source   = "registry.coder.com/modules/nodejs/coder"
  version  = "1.0.10"
  agent_id = coder_agent.example.id
  node_versions = [
    "18",
    "20",
    "node"
  ]
  default_node_version = "20"
}

Full example

A example with all available options:

module "nodejs" {
  source             = "registry.coder.com/modules/nodejs/coder"
  version            = "1.0.10"
  agent_id           = coder_agent.example.id
  nvm_version        = "v0.39.7"
  nvm_install_prefix = "/opt/nvm"
  node_versions = [
    "16",
    "18",
    "node"
  ]
  default_node_version = "16"
}