Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/eco 270 updated evn variable #6

Merged
merged 3 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#create environment file name as .env.development.local,.env.production.local
#and place following configuration data.

API_KEY=YOUR_API_KEY
DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN
ENVIRONMENT=YOUR_PUBLISHING_ENVIRONMENT
CONTENTSTACK_API_KEY=YOUR_API_KEY
CONTENTSTACK_DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN
CONTENTSTACK_ENVIRONMENT=YOUR_PUBLISHING_ENVIRONMENT

# For setting region add REGION=(Optional for US region) Eg- eu
# For setting custom host add CUSTOM_HOST=(Optional)
# For setting region add CONTENTSTACK_REGION=(Optional for US region) Eg- eu
# For setting custom host add CONTENTSTACK_CUSTOM_HOST=(Optional)
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

* @contentstack/security-admin @contentstack/ecosystem-admin
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "contentstack-nextjs-starter-app",
"description": "A starter app for Contentstack and Nextjs",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"author": "Contentstack",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions sdk-plugin/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const contentstack = require("contentstack");

const Stack = contentstack.Stack({
api_key: process.env.API_KEY,
delivery_token: process.env.DELIVERY_TOKEN,
environment: process.env.ENVIRONMENT,
region: process.env.REGION ? process.env.REGION : "us",
api_key: process.env.CONTENTSTACK_API_KEY,
delivery_token: process.env.CONTENTSTACK_DELIVERY_TOKEN,
environment: process.env.CONTENTSTACK_ENVIRONMENT,
region: process.env.CONTENTSTACK_REGION ? process.env.CONTENTSTACK_REGION : "us",
});

if (process.env.CUSTOM_HOST) {
Stack.setHost(process.env.CUSTOM_HOST);
if (process.env.CONTENTSTACK_CUSTOM_HOST) {
Stack.setHost(process.env.CONTENTSTACK_CUSTOM_HOST);
}
export default {
/**
Expand Down