Skip to content

Commit 27aded8

Browse files
committed
updated comments and code to hide ORDER_URI under .env on OrderModel.js
Co-authored-by: Jon Cruz [email protected] Co-authored-by: Elena Atencio [email protected] Co-authored-by: Iris Wong [email protected]
1 parent 971bfb3 commit 27aded8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/gRPC/orders/OrderModel.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ const mongoose = require('mongoose');
22
require('dotenv').config();
33
const { Schema } = mongoose;
44

5-
// UNCOMMENT THE LINE BELOW AND REPLACE WITH AN ACTUAL MONGODB URI FOR YOUR "ORDERS" DATABASE
5+
// Add your "ORDER_URI = " to your .env file
66
// require('./chronos-config'); // Bring in config file
7-
// const myURI = process.env.ORDER_URI;
8-
const myURI = 'mongodb+srv://johnlloyddonato:[email protected]/test';
7+
const myURI = process.env.ORDER_URI;
98

109
mongoose.connect(myURI, { useNewUrlParser: true, useUnifiedTopology: true })
1110
.then(() => console.log('Connected!!!********* Order Database is live!!!'))

0 commit comments

Comments
 (0)