Skip to content

Commit

Permalink
add http to default localhost urls
Browse files Browse the repository at this point in the history
  • Loading branch information
BEW111 committed Oct 1, 2024
1 parent 47951a7 commit ab80cd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
7 changes: 1 addition & 6 deletions client/src/util/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ async function resolve(promise: Promise<any>) {
* To UPDATE DURING DEPLOYMENT USING ENVIRONMENT VARIABLES
*/
const BACKEND_URL =
process.env.REACT_APP_BACKEND_URL || 'backend url not found';

console.log(`BACKEND_URL: ${BACKEND_URL}`);

// const BACKEND_URL = 'api.hackboilerplate.com';

process.env.REACT_APP_BACKEND_URL || 'http://localhost:4000';
const URLPREFIX = `${BACKEND_URL}/api`;

/**
Expand Down
4 changes: 1 addition & 3 deletions server/src/config/createExpressApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import ApiError from '../util/apiError.ts';
* @returns The configured {@link express.Express} instance
*/
const createExpressApp = (sessionStore: MongoStore): express.Express => {
const FRONTEND_URL = process.env.FRONTEND_URL || 'frontend url not found';
console.log(`FRONTEND_URL: ${FRONTEND_URL}`);

const FRONTEND_URL = process.env.FRONTEND_URL || 'http://localhost:3000';
const app = express();

// Set up passport and strategies
Expand Down
3 changes: 1 addition & 2 deletions server/src/services/mail.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import SGmail, { MailDataRequired } from '@sendgrid/mail';

const appName = 'Boilerplate'; // Replace with a relevant project name
const senderName = 'Hack4Impact UPenn'; // Replace with a relevant project sender
const baseUrl = process.env.FRONTEND_URL || 'frontend url not found'; // TODO: figure out better place to put this
console.log(baseUrl);
const baseUrl = process.env.FRONTEND_URL || 'http://localhost:3000';

// eslint-disable-next-line no-useless-concat
SGmail.setApiKey(`${process.env.SENDGRID_API_KEY}`);
Expand Down

0 comments on commit ab80cd0

Please sign in to comment.