H
H
H_0_12015-12-01 13:24:49
Node.js
H_0_1, 2015-12-01 13:24:49

How to know nodejs version from code?

Requires an analogue of node -v , which will return the version of nodejs in the code. I want to output it using console.log .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2015-12-01
@H_0_1

$ node
> process.version
'v4.2.2'
> process.versions
{ http_parser: '2.5.0',
  node: '4.2.2',
  v8: '4.5.103.35',
  uv: '1.7.5',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '55.1',
  modules: '46',
  openssl: '1.0.2d' }
>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question