Next.js Discord

Discord Forum

Small Storage :)

Answered
Arinji posted this in #help-forum
Open in Discord
Ok so I have this Tetris game on my portfolio which is hosted on vercel. Now I want to have a basic leaderboard by which like I can save highscores. But I don't really want to setup an entire pocketbase db for this. I do have a MySQL server setup on my vps. But is there any easy way to like just save it in a json file? Due to vercel I can't just write to their filesystem so was open to any ideas :)

13 Replies

abuse unstable_cache
@risky ~~abuse unstable_cache~~
wha how lmao
Gist database
I built the package just for you
Answer
This is perfect for low write / high read scenarios. When combined with nextjs caching especially.
Awesome wow directly for my usecase lol
Ping me if there’s issues or questions.
Will do :D
@Arinji Curious how it worked out for you
@linesofcode <@890486507872342027> Curious how it worked out for you
havent done so yet, was working on a diff thing. Will let you know when im gonna work on the db thing
i for some reason.. start a lot of stuff together lmao, takes me a while to go through this queue i make for myself unknowningly xD
currently learning go and rewriting my backends lol