# How to integrate an npm package

> Add the Grovs SDK to your web project using npm.

Source: https://docs.grovs.io/docs/how-to-guides/web/npm

### 1. Create package.json

Skip this for an existing project:

```bash
npm init -y
```

### 2. Install the package

```bash
npm install grovs
```

### 3. Import the package

**CommonJS**

```javascript
const { default: Grovs } = require('grovs');
```

**ES Modules**

```javascript
import Grovs from 'grovs';
```

> **Note:** Bundlers such as Webpack, Vite and Parcel resolve the import at build time.

### 4. Configure the SDK

```javascript
await Grovs.configure({
  apiKey: 'your-api-key',
  // Additional configuration options
});
```

See the [Web Quick Start](https://docs.grovs.io/docs/sdk/web/quick-start) for every configuration option.
