JS - Finished implementation of creating a database entry and retrieving the last one.