简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM