Skip to content
Reindex starter kit with Apollo Client
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.eslintrc
.gitignore
LICENSE
README.md
package.json
webpack.local.config.js
webpack.production.config.js

README.md

reindex-starter-kit-react-apollo

Comprehensive Reindex starter kit with React, Apollo Client and Auth0 for Authentication. It also includes react-router, so it's easy to add new routes.

Running

  1. Install Reindex CLI and login

    npm install -g reindex-cli
    reindex login
  2. Set up Auth0 in Reindex

    Open GraphiQL console

    reindex graphiql

    In GraphiQL, create ReindexAuthenticationProvider for Auth0.

    mutation {
      createReindexAuthenticationProvider(input: {
        type: auth0,
        isEnabled: true,
        domain: "YOUR-AUTH0-DOMAIN.auth0.com",
        clientId: "YOUR-AUTH0-CLIENT-ID",
        clientSecret: "YOUR-AUTH0-CLIENT-SECRET",
      }) {
        id
      }
    }
  3. Install dependencies

    npm install
    
  4. Edit src/config.js to include your Reindex and Auth0 credentials

    export default {
      REINDEX_URL: 'https://YOUR-REINDEX-URL.myreindex.com',
      AUTH0_DOMAIN: 'YOUR-AUTH0-DOMAIN.auth0.com',
      AUTH0_CLIENT_ID: 'YOUR-AUTH0-CLIENT-ID',
    };
  5. Run development server

    npm start
    

    Go to http://localhost:3000

Deploying

  1. Build production version

    npm run build
    
  2. You can now deploy build/ folder to static hosting of your choice. We recommend surge.sh.

    npm install -g surge
    surge build/
    
You can’t perform that action at this time.