ExpressJS SSL on one domain only

I'm using ExpressJS. My app is a https server which also contains a vhost.

app.use(express.vhost('api.example.com', require('./lib/subdomains/api').app));

Because my SSL certificate is for the root domain only, my api.example.com domain now fails to load the routes it's been given.

How can I only use SSL on my root domain and not on my other? I need to be able to share the app configuration between the domains, but not the SSL certificate.

Doh. I hadn't changed my NODE_ENV so the vhost was setup incorrectly in the live environment.