-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.config.js
69 lines (60 loc) · 2.22 KB
/
env.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
'use strict';
require('dotenv').config();
const env = process.env.APP_ENV;
const shopifyAccessTokenUrl = '/admin/oauth/access_token';
const shopifyShopUrl = '/admin/shop.json';
const shopifyReadProductUrl = '/admin/products.json';
const shopifyWebHookUrl = '/admin/webhooks.json';
const shopifydeleteWebHookUrl = '/admin/webhooks/';
const scopes = 'read_products,write_products';
const local = {
domain: 'http://localhost:3000/',
shopifydomain: 'https://dev.aroundthecorner.store/',
clientApiKey: process.env.LOCAL_API_KEY,
scopes: scopes,
apiKey: process.env.LOCAL_API_KEY,
apiSecretKey: process.env.LOCAL_API_SECRET_KEY,
shopifyAccessTokenUrl: shopifyAccessTokenUrl,
shopifyShopUrl: shopifyShopUrl,
shopifyReadProductUrl: shopifyReadProductUrl,
shopifyWebHookUrl: shopifyWebHookUrl,
shopifydeleteWebHookUrl: shopifydeleteWebHookUrl,
redirectUri: 'http://localhost:3001/shopify',
fileDirectory: process.env.LOCAL_FILE_DIRECTORY,
};
const dev = {
domain: 'https://dev.aroundthecorner.store/',
shopifydomain: 'https://dev.aroundthecorner.store/',
clientApiKey: process.env.DEV_API_KEY,
scopes: scopes,
apiKey: process.env.DEV_API_KEY,
apiSecretKey: process.env.DEv_API_SECRET_KEY,
shopifyAccessTokenUrl: shopifyAccessTokenUrl,
shopifyShopUrl: shopifyShopUrl,
shopifyReadProductUrl: shopifyReadProductUrl,
shopifyWebHookUrl: shopifyWebHookUrl,
shopifydeleteWebHookUrl: shopifydeleteWebHookUrl,
redirectUri: 'http://atcdev.aroundthecorner.store/shopify',
fileDirectory: process.env.DEV_FILE_DIRECTORY,
};
const production = {
domain: 'https://api.aroundthecorner.store/',
shopifydomain: 'https://api.aroundthecorner.store/',
clientApiKey: process.env.PRODUCTION_API_KEY,
scopes: scopes,
apiKey: process.env.PRODUCTION_API_KEY,
apiSecretKey: process.env.PRODUCTION_API_SECRET_KEY,
shopifyAccessTokenUrl: shopifyAccessTokenUrl,
shopifyShopUrl: shopifyShopUrl,
shopifyReadProductUrl: shopifyReadProductUrl,
shopifyWebHookUrl: shopifyWebHookUrl,
shopifydeleteWebHookUrl: shopifydeleteWebHookUrl,
redirectUri: 'https://app.aroundthecorner.store/shopify',
fileDirectory: process.env.PRODUCTION_FILE_DIRECTORY,
};
const config = {
local,
dev,
production,
};
module.exports = config[env];