nodejs.nim 354 B

1234567891011
  1. import os
  2. proc findNodeJs*(): string {.inline.} =
  3. ## Find NodeJS executable and return it as a string.
  4. result = findExe("nodejs")
  5. if result.len == 0:
  6. result = findExe("node")
  7. if result.len == 0:
  8. echo "Please install NodeJS first, see https://nodejs.org/en/download"
  9. raise newException(IOError, "NodeJS not found in PATH: " & result)