'Looking for a json key/value backend application

I have a website and it stores users shoppingcarts in a cookie. Now turns out they have a 4k limit so I wanted to use localStorage. Our website uses wildcard domains and so that doesn't work either. I saw hacks using a iframe however that isn't an option.

I have a possible solution and that is to store the shoppingcart (in json) in a database through a backend application. We don't need security just a simple solution where we can persist and read json in the form of a key/value pair to and from a endoint. The key being a unique uuid for that session/user and the value being the shoppingcart. Is there a solution like this?



Solution 1:[1]

Of course there is! You've got a few options, including Flask (Python), Express (node.js). For either, if you're trying to go the simple way, you can actually just create a json file and query it from the server.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vibeman1987