File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 11const mongoose = require ( 'mongoose' ) ;
2- const dotenv = require ( 'dotenv' ) ;
3-
4- dotenv . config ( ) ;
52
63const connectDB = async ( ) => {
74 try {
85 const conn = await mongoose . connect ( process . env . MONGO_URI ) ;
9- console . log ( `Connection established with MongoDB: ${ conn . connection . host } ` ) ;
6+ console . log ( `Connected to MongoDB: ${ conn . connection . host } ` ) ;
107 } catch ( error ) {
11- console . error ( `Something went wrong : ${ error . message } ` ) ;
8+ console . error ( `DB Error : ${ error . message } ` ) ;
129 process . exit ( 1 ) ;
1310 }
1411} ;
Original file line number Diff line number Diff line change 11const express = require ( 'express' ) ;
2- const dotenv = require ( 'dotenv' ) ;
32const cors = require ( 'cors' ) ;
43const helmet = require ( 'helmet' ) ;
54const morgan = require ( 'morgan' ) ;
@@ -8,7 +7,9 @@ const userRoutes = require('./routes/userRoutes');
87const productRoutes = require ( './routes/productRoutes' ) ;
98const paymentRoutes = require ( './routes/paymentRoutes' ) ;
109
11- dotenv . config ( ) ;
10+ if ( process . env . NODE_ENV !== 'production' ) {
11+ require ( 'dotenv' ) . config ( ) ;
12+ }
1213
1314connectDB ( ) ;
1415
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { colors } from '../theme/colors';
66import { useApp } from '../context/AppContext' ;
77import RazorpayCheckout from 'react-native-razorpay' ;
88
9- const API_URL = 'http ://10.254.200.236:5001 ' ;
9+ const API_URL = 'https ://zappify-dz5a.vercel.app ' ;
1010const RAZORPAY_KEY_ID = 'rzp_test_SZtLthHdKYuLeQ' ;
1111
1212const STEPS = [ 'MY BAG' , 'ADDRESS' , 'PAYMENT' ] ;
You can’t perform that action at this time.
0 commit comments