Skip to content

Commit

Permalink
variable change logic for node env
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahlessner committed Dec 20, 2024
1 parent 868e152 commit 1bef4e1
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions apps/jira/jira-app/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
let LAMBDA_URI = 'https://api.jira.ctfapps.net';
let CLIENT_ID = 'XD9k9QU9VT4Rt26u6lbO3NM0fOqvvXan';

if (import.meta.env.DEV) {
console.log('Running in development mode');
if (process.env.NODE_ENV === 'development') {
LAMBDA_URI = `${import.meta.env.VITE_NGROK_URL}/test`;
CLIENT_ID = import.meta.env.VITE_ATLASSIAN_APP_CLIENT_ID || '';
}

// interface ImportMetaValue extends ImportMeta {
// NODE_ENV?: string;
// VITE_NGROK_URL?: string;
// VITE_ATLASSIAN_APP_CLIENT_ID?: string;
// }

// if ((import.meta as ImportMetaValue).NODE_ENV === 'development') {
// console.log('development');
// LAMBDA_URI = `${(import.meta as ImportMetaValue).VITE_NGROK_URL}/test`;
// CLIENT_ID = (import.meta as ImportMetaValue).VITE_ATLASSIAN_APP_CLIENT_ID || '';
// }

// if (process.env.NODE_ENV === 'development') {
// console.log('development');
// LAMBDA_URI = `${process.env.REACT_APP_NGROK_URL}/test`;
// CLIENT_ID = process.env.REACT_APP_ATLASSIAN_APP_CLIENT_ID || '';
// }

const constants = {
OAUTH_REDIRECT_URI: `${LAMBDA_URI}/auth`,
CONNECT_URL: `${LAMBDA_URI}/connect.json`,
Expand Down

0 comments on commit 1bef4e1

Please sign in to comment.