JSON can have data represented in about 5 primitive data types: String,
Number, Array, Boolean, and Null. So if you are using express, and you have
a javascript object that you would like to send to the client as json, the
data fields(or object properties) will be cast to any of the respective
data
JSON can have data represented in about 5 primitive data types: String,
Number, Array, Boolean, and Null. So if you are using express, and you have
a javascript object that you would like to send to the client as json, the
data fields(or object properties) will be cast to any of the respective
In index.js you are not exporting the connection object, you are only exporting
router object. That is why you are getting the error when you reference
connection object in booksModel.js. You could try the following:
Step 1: In index.js include connection in the module exports as below:
module.ex