fix: npm init use in nodejs example. (#3855) (#3856)

pull/3851/head^2
Jason Stirnaman 2022-03-14 12:32:03 -05:00 committed by GitHub
parent 0782127bf0
commit 3199386877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,7 @@ aliases:
---
## Install Node.js
## Install Node.js
1. Install [Node.js](https://nodejs.org/en/download/package-manager/).
@ -25,7 +25,8 @@ aliases:
The `npm` package manager is included with Node.js.
```sh
npm init -y influx-node-app
mkdir influx-node-app && cd influx-node-app
npm init -y
```
## Install TypeScript
@ -69,7 +70,7 @@ Add both as dependencies of your project.
Once you've installed the Javascript client library, you're ready to [write data](/influxdb/v2.1/api-guide/client-libraries/nodejs/write/) to InfluxDB or [get started](#get-started-with-examples) with other examples from the client library.
## Get started with examples
## Get started with examples
{{% note %}}
The client examples include an [`env`](https://github.com/influxdata/influxdb-client-js/blob/master/examples/env.js) module for accessing your InfluxDB properties from environment variables or from `env.js`.