gatsby-source-d365-events

0.3.0 • Public • Published

gatsby-source-d365-events

Source plugin for pulling data from Microsoft Dynamics 365 event management into Gatsby websites.

Install

From the command line, use npm to install the plugin:

npm install gatsby-source-d365-events

In the gatsby-config.js file in the Gatsby project's root directory, add the plugin configuration inside of the plugins section. Every option is mandatory and can be found where you register your web application:

module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-d365-events`,
      options: {
        endpoint: `https://abc.svc.dynamics.com`,
        token: process.env.D365_TOKEN,
        origin: "https://myorigin.local",
      },
    },
  ],
};

Using .env variables

You should definitely not include you token information in your source code. To configure this and enable easy deployment to multiple environments using different instances of D365, you can use environment variables.

In your .env file

D365_ENDPOINT = https://abd.svc.dynamics.com
D365_TOKEN = secret!
D365_ORIGIN = https://myorigin.local

In your gatsby-config.js file

require("dotenv").config({
  path: `.env.${process.env.NODE_ENV}`,
});

module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-d365-events",
      options: {
        endpoint: process.env.D365_ENDPOINT,
        token: process.env.D365_TOKEN,
        origin: process.env.D365_ORIGIN,
      },
    },
  ],
};

Package Sidebar

Install

npm i gatsby-source-d365-events

Weekly Downloads

2

Version

0.3.0

License

0BSD

Unpacked Size

9.07 kB

Total Files

5

Last publish

Collaborators

  • draape