Although other have not advised doing this, I believe this is what you are looking for. I do something like this in my server.js file when using express.
if (process.env.NODE_ENV == 'production') {
app.use(express.static('/dist'));
}else{
app.use(express.static('/app'));
}
Hope this helps!