Web Server using CC3000

I have seen people write up code for their arduinos to make a web server that runs html to make a nice interface but can't seem to find anything to do it using the wifi shield. Does anybody know how this could be done? I would like to simply click a "button" on a site ran by the arduino and have the arduino do something depending on what button was pressed.

I have seen people do it using a computer but I would like the arduino to be standalone.

When you handle the http response, just check what the requested page is, and if it's a "magic" url , do something - meanwhile the first page it serves would fire off said requests as an xhr when you click the button.

This is extremely common, I am sure there are examples of running an HTTP server.

That said, why the hell are you using a CC3k? Those cost ten times as much as an ESP8266, and are no less flaky, and are harder to control.