URL Shortener Microservice without mongoose

<%= @topic_view.topic.title %>
<%= @topic_view.topic.average_rating %> <%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %>

Apis and Microservices Projects - URL Shortener Microservice

Please take a look to my solution to find bugs…
I did not used mongoose. This is my first program with no-sql database… I had many issues because of the asyncronous running but hopefully I correct every single bugs…
I use an autoincrement- id as a short Url. One of my biggest bug was the closing database… At least I close only on server.js:158 and server.js:198.
I wrote many comment to help to understand my logic.
I am not sure this is the right way…

Thanks for your feedback


Glitch link
Github link