I'm developing a site in which the user can create his set of questions and asnwers. I'll have some datas, for example:
Question1: "What's your name?";
Right answer: "Emiliano";
Wrong answers: ["Luke", "Mathew"]
Question2: "What's your favourite color?";
Right answer: "Green";
Wrong answers: ["Blue", "Black"]ù
...and so on.
and I want to give to some users the chance to create their own test. My solution has to be focus on the performance (in my last quiz-site I had 10k users online at the same time). How can I do? I've thought I can generate static html pages from my data (this is how we've done since now, but since now our quizzes were generate by us and not by users, so we generated like 2 quizzes per day and in these two times we were able to use some expensive-performance tool like php). I've read I can use node.js to generate my pages server-side, but there's some way to generate them client-side? I don't want to use my server as long as I can.
I need to generate page like
www.mysite.com/user-name/1.html
www.mysite.com/user-name/2.html
www.mysite.com/user-name/3.html
www.mysite.com/user-name/result.html
In which 1.html contain Question1 data and so on.
Also, let me know if I can do this in another "simple" way. Thank you and sorry If I've written some meaningless things (in case, let me know what mistake I've made), first week on Javascript (and coding).
document.create
it allows you to create elements in javascript. You can append these elements to the DOM usingelement.appendChild
– Mouser Jan 17 at 16:44