Showing
6 changed files
with
11 additions
and
4 deletions
Apikey.txt
0 → 100644
1 | +"https://maps.googleapis.com/maps/api/js?key=sAIzaSyDK6K4iDdo9cKQdrNoOJaaYg29nEG0BIjw&callback=initMap&libraries=&v=weekly" | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -16,7 +16,8 @@ mongoose.set('useCreateIndex', true); | ... | @@ -16,7 +16,8 @@ mongoose.set('useCreateIndex', true); |
16 | mongoose.set('useUnifiedTopology', true); | 16 | mongoose.set('useUnifiedTopology', true); |
17 | 17 | ||
18 | // Connect DB environment variable | 18 | // Connect DB environment variable |
19 | -mongoose.connect('mongodb+srv://Mapmory_admin:admin@cluster0.ncnjj.mongodb.net/Project-Mapmory?retryWrites=true&w=majority'); | 19 | +const mongokey = require('./keys.json'); |
20 | +mongoose.connect(mongokey.Mongokey); | ||
20 | 21 | ||
21 | // Store DB in the variable 'db' | 22 | // Store DB in the variable 'db' |
22 | var db = mongoose.connection; | 23 | var db = mongoose.connection; | ... | ... |
keys.json
0 → 100644
... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
4 | "description": "", | 4 | "description": "", |
5 | "main": "index.js", | 5 | "main": "index.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | - "test": "echo \"Error: no test specified\" && exit 1" | 7 | + "test": "echo \"Error: no test specified\" && exit 1", |
8 | + "start" : "nodemon index.js" | ||
8 | }, | 9 | }, |
9 | "keywords": [], | 10 | "keywords": [], |
10 | "author": "", | 11 | "author": "", | ... | ... |
... | @@ -135,7 +135,7 @@ | ... | @@ -135,7 +135,7 @@ |
135 | 135 | ||
136 | <!-- Async script executes immediately and must be after any DOM elements used in callback. --> | 136 | <!-- Async script executes immediately and must be after any DOM elements used in callback. --> |
137 | <script | 137 | <script |
138 | - src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDK6K4iDdo9cKQdrNoOJaaYg29nEG0BIjw&callback=initMap&libraries=&v=weekly" | 138 | + src="./key1.js" |
139 | async | 139 | async |
140 | ></script> | 140 | ></script> |
141 | </body> | 141 | </body> | ... | ... |
... | @@ -141,8 +141,9 @@ | ... | @@ -141,8 +141,9 @@ |
141 | 141 | ||
142 | 142 | ||
143 | <!-- Async script executes immediately and must be after any DOM elements used in callback. --> | 143 | <!-- Async script executes immediately and must be after any DOM elements used in callback. --> |
144 | + | ||
144 | <script | 145 | <script |
145 | - src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDK6K4iDdo9cKQdrNoOJaaYg29nEG0BIjw&callback=initMap&libraries=&v=weekly" | 146 | + src="https://maps.googleapis.com/maps/api/js?key=sAIzaSyDK6K4iDdo9cKQdrNoOJaaYg29nEG0BIjw&callback=initMap&libraries=&v=weekly" |
146 | async | 147 | async |
147 | ></script> | 148 | ></script> |
148 | 149 | ... | ... |
-
Mentioned in commit edd39c9a
-
Please register or login to post a comment