I am going to make a new version of corner detection challenge judge, and I am trying to make it with imba in both client side and server side, in the middle we use restful API and socket for communication, while the database we are trying to use MongoDB.
As for imba environment set up I have another note already, this time it is MongoDB which I am totally new with. MongoDB is a noSQL architecture that do database queries without SQL, looks like firebase, however, it seems there is no way to listen to changes like firebase (stackoverflow).
Follow the instructions so that MongoDB would be installed on your computer, and really at localhost:27071
In your node project which uses MongoDB, run npm i mongodb
Connect
As for successful connection, the program will print out "successfully connect to mongo", and you can use the client object for further application
Further: sequential initialization with Express
Insert
If my_db database or my_collection collection has not been created before insertion, mongo will create it first then create.
Query
The {} is an atomic operation which describes the items that you are going to query, for example {age:{$gt:18}} means you are going to query an item with attribute age greater than 18