export server object

Added possibility to create and return server object for adding extra functionality. This enables creating simple scripts using the serve module to serve data but also to build other stuff on top of it. Not sure if this is anything you are interested in. Feel free to grab it if that's the case. I find it useful at least and it's MIT :)