Should I Build My Trivia Website as Static or Dynamic?
Asked by
cello.endpin
Hey everyone! I'm diving into creating a simple trivia website where users can answer questions, and a new one pops up automatically. There's a bit of animation involved too. I'm torn between using a static or dynamic approach for my question-and-answer database. Also, if there's a difference, what free hosting options would work well for either? I'm just practicing right now; traffic isn't a concern yet, but if it turns out fun, I might need to think about it. I'm considering Firebase or Netlify, but I'm open to suggestions. GitHub feels a bit intimidating to meโshould I be worried? Thanks for any advice!
Answers
A dynamic database is definitely better for easily adding or updating content. Netlify is great for static sites, while Firebase supports dynamic dataโthat should work for your needs. And don't sweat GitHub too much; it's more for version control than hosting.
Reply to this answer
Honestly, look at Wordleโit's static, and you can see answers if you inspect it. But it works because most people aren't out to cheat. If someone wants to cheat on your trivia game, theyโre just cheating themselves out of the fun.
Reply to this answer
You could do static, but all your Q&A would need to be in JavaScript, making it easy for cheaters. A more practical route would be dynamic with a backend, so you can update content easily. For that, I'd suggest using Node.js with Express.js, since itโs all JavaScript and will be easier for you. GitHub isn't as scary as it seemsโit's just about Pull -> Commit -> Push. Plus, they host static sites for free too, but a dynamic approach suits your idea better.
cello.endpin: Great answer! Thanks for the tips!
Reply to this answer
I'd probably recommend going with a static setup. Sure, your data won't be super safe from prying eyes, but it lets you focus on front-end work, which can be quite a lot if you're new. You could even obfuscate your data a bit on the static site. Plus, a static site avoids the complexities and security risks of having a dynamic backend. Just stick with standard web technologies and enjoy the process!
cello.endpin: Thanks! I'm not too worried about cheating, so this definitely helps me make my decision.
Reply to this answer
Add your answer
Answers are reviewed before publication.
!add more pepper: Good info! I really enjoy playing Wordle.