When i run nodemon file.js it show this (cmd) :
(node:23816) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:23816) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
And then when i POST in Postman show this (cmd) :
events.js:287
throw er; // Unhandled 'error' event
^
ReferenceError: response is not defined
at D:\Desktop\swag-shop-api\server.js:21:7
at D:\Desktop\swag-shop-api\node_modules\mongoose\lib\model.js:4889:16
at D:\Desktop\swag-shop-api\node_modules\mongoose\lib\helpers\promiseOrCallback.js:24:16
at D:\Desktop\swag-shop-api\node_modules\mongoose\lib\model.js:4912:21
at model.<anonymous> (D:\Desktop\swag-shop-api\node_modules\mongoose\lib\model.js:493:7)
at D:\Desktop\swag-shop-api\node_modules\kareem\index.js:315:21
at next (D:\Desktop\swag-shop-api\node_modules\kareem\index.js:209:27)
at D:\Desktop\swag-shop-api\node_modules\kareem\index.js:182:9
at D:\Desktop\swag-shop-api\node_modules\kareem\index.js:507:38
at processTicksAndRejections (internal/process/task_queues.js:79:11)
Emitted 'error' event on Function instance at:
at D:\Desktop\swag-shop-api\node_modules\mongoose\lib\model.js:4891:13
at D:\Desktop\swag-shop-api\node_modules\mongoose\lib\helpers\promiseOrCallback.js:24:16
[... lines matching original stack trace ...]
at processTicksAndRejections (internal/process/task_queues.js:79:11)
[nodemon] app crashed - waiting for file changes before starting...
but when i do db.products.find({}) it shows everything i POST form postman
Please can someone help me...