# Installation

Install module (opens new window) into your app.

npm install @vsf-enterprise/bloomreach-search-gql --save

or

yarn add @vsf-enterprise/bloomreach-search-gql

# Setup


Install @vue-storefront/middleware

npm install @vue-storefront/middleware --save

or

yarn add @vue-storefront/middleware

Create a new file middleware.config.js in your root folder. Pass the configuration.

module.exports = {
  integrations: {
    brs: {
      location: '@vsf-enterprise/bloomreach-search-gql/server',
      configuration: {
        endpoint: 'https://endpoint.url/graphql',
        envId: 'your_account_env_id'
      },
    },
    // ... other configs
  },
}

In the nuxt.config.js file just leave the module initialization. Like this.

buildModules: ['@vsf-enterprise/bloomreach-search-gql/nuxt']

You will also need to register package module as a rawSource in the @vue-storefront/nuxt module. Like that.

['@vue-storefront/nuxt', {
  ...
  useRawSource: {
    dev: ['@vsf-enterprise/bloomreach-search-gql'],
    prod: ['@vsf-enterprise/bloomreach-search-gql'],
  }
}],