Compare commits
2 Commits
aa071f329c
...
16eb5ace80
| Author | SHA1 | Date | |
|---|---|---|---|
| 16eb5ace80 | |||
| 2f8898806b |
|
|
@ -1,3 +1,9 @@
|
|||
AMAZON_PA_ACCESS_KEY=AAAABBBBCCCCDDDDEEEE
|
||||
AMAZON_PA_SECRET_KEY=ABCDABCDABCDABCDABCDABCDABCDABCDABCDAB
|
||||
AMAZON_PA_HOST=webservices.amazon.com
|
||||
AMAZON_PA_REGION=us-east-1
|
||||
AMAZON_PA_PARTNER_TYPE=Associate
|
||||
AMAZON_PA_PARTNER_TAG=yourpartnertag-20
|
||||
GOOGLE_ADSENSE_ADS_TXT="google.com, pub-1234567890abcdef, DIRECT, fedcba9876543210"
|
||||
GOOGLE_ANALYTICS_GTAG=G-1234567890
|
||||
SITE_URL=http://localhost
|
||||
|
|
@ -11,12 +11,24 @@ const __filename = fileURLToPath(import.meta.url);
|
|||
const __dirname = path.dirname(__filename);
|
||||
|
||||
export interface ProcessEnv {
|
||||
AMAZON_PA_ACCESS_KEY?: string;
|
||||
AMAZON_PA_SECRET_KEY?: string;
|
||||
AMAZON_PA_HOST?: string;
|
||||
AMAZON_PA_REGION?: string;
|
||||
AMAZON_PA_PARTNER_TYPE?: string;
|
||||
AMAZON_PA_PARTNER_TAG?: string;
|
||||
GOOGLE_ADSENSE_ADS_TXT?: string;
|
||||
GOOGLE_ANALYTICS_GTAG?: string;
|
||||
SITE_URL?: string;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
AmazonProductAdvertisingAPIAccessKey: string;
|
||||
AmazonProductAdvertisingAPISecretKey: string;
|
||||
AmazonProductAdvertisingAPIHost: string;
|
||||
AmazonProductAdvertisingAPIRegion: string;
|
||||
AmazonProductAdvertisingAPIPartnerType: string;
|
||||
AmazonProductAdvertisingAPIPartnerTag: string;
|
||||
GoogleAdsenseAdsTxt: string;
|
||||
GoogleAnalyticsGTag: string;
|
||||
siteUrl: string;
|
||||
|
|
@ -32,6 +44,12 @@ dotEnvConfig = dotenvExpand.expand({
|
|||
processEnv: process.env as dotenvExpand.DotenvParseInput
|
||||
});
|
||||
|
||||
export const getAmazonProductAdvertisingAPIAccessKey = () => (env.AMAZON_PA_ACCESS_KEY||``).trim();
|
||||
export const getAmazonProductAdvertisingAPISecretKey = () => (env.AMAZON_PA_SECRET_KEY||``).trim();
|
||||
export const getAmazonProductAdvertisingAPIHost = () => (env.AMAZON_PA_HOST||``).trim();
|
||||
export const getAmazonProductAdvertisingAPIRegion = () => (env.AMAZON_PA_REGION||``).trim();
|
||||
export const getAmazonProductAdvertisingAPIPartnerType = () => (env.AMAZON_PA_PARTNER_TYPE||`Associate`).trim();
|
||||
export const getAmazonProductAdvertisingAPIPartnerTag = () => (env.AMAZON_PA_PARTNER_TAG||``).trim();
|
||||
export const getGoogleAnalyticsGtag = () => (env.GOOGLE_ANALYTICS_GTAG||``).trim();
|
||||
export const getGoogleAdsenseAdsTxt = () => (env.GOOGLE_ADSENSE_ADS_TXT||``).trim()||`google.com, pub-1234567890abcdef, DIRECT, fedcba9876543210`;
|
||||
export const getSiteUrl = () => trimSlashes(env.SITE_URL||`http://localhost`);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user