Express Base Path & Initial API call

If my index file is located in ./builds/development/index.html, and I want to keep the catch-all API as this:

server.get('*', function (req, res) {
    res.sendfile('index.html');
});

How do I set Express up to mount at ./builds/development/ or ./builds/production/ based on process.env.NODE_ENV?

Thanks

I found a solution:

// Requests catch-all
server.get('*', function (req, res) {
    res.sendfile('index.html', {root: config.basePath});
});