singleton->factory

use-case: http and https server for the same code