I personnaly make such an usage of FreeCAD to generate a custom Wooden Pergola.
It's a form where you enter values of your desired structure, when you click on the "Construire" button it launch a FreeCAD script that generate the structure then export it in WebGl then I display the webgl file in an Iframe.
You can try that here :
http:// wood3dservices dot com:8888 (I make the link unclickable because it's use a pretty huge ressources and it's on a little server at home, please don't set huge values in the form
Of course the script can create what you want (all possible export format supported by FreeCAD, even Drawings)
I was inspired by danielfalck work : https://github.com/danielfalck/freecadweb
So it need a web server, mine is nginx (in fact I'm not sure it's needed), a Tornado server, a FreeCAD installation, and FreeCAD scripts. If I remember well (yes I made this 2 years ago). The Tornado server display the form generated by a python script, then it's launch the FreeCAD script by passing argument from the form, the script make the file and Tornado display an html page that embedded the webgl file.
Not sure it's clear but it can give you some idea.