Skip to content

Commit

Permalink
changed
Browse files Browse the repository at this point in the history
  • Loading branch information
JATIN-RAGHAV committed Jun 5, 2024
1 parent 4c3207e commit 5f9eb85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/config.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const backendUrl ="ec2-54-242-37-1.compute-1.amazonaws.com";
export const backendUrl ="http://ec2-54-242-37-1.compute-1.amazonaws.com:3000";
4 changes: 4 additions & 0 deletions server/dir/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ const mongoose_1 = __importDefault(require("mongoose"));
const route_1 = __importDefault(require("./routes/route"));
const config_1 = require("./config");
const path_1 = __importDefault(require("path"));
const cors_1 = __importDefault(require("cors"));
const app = (0, express_1.default)();
app.use(express_1.default.json());
app.use((0, cors_1.default)({
origin: 'http://ec2-54-242-37-1.compute-1.amazonaws.com'
}));
// Middleware to set the MIME type for JavaScript files
app.use((req, res, next) => {
if (req.path.endsWith('.js')) {
Expand Down
Loading

0 comments on commit 5f9eb85

Please sign in to comment.