/routes/index.coffee ファイルに次のコードがあります。
exports.Dropbox = (req, res) ->
production = if process.env['NODE_ENV'] == "production" then true
if production
mixpanelId = PROD_MIXPANEL_ID
res.render 'connectors/Dropbox', { title: 'About Dropbox', mixpanelId: mixpanelId, production: production }
exports.Box = (req, res) ->
production = if process.env['NODE_ENV'] == "production" then true
if production
mixpanelId = PROD_MIXPANEL_ID
res.render 'connectors/Box', { title: 'About Box', mixpanelId: mixpanelId, production: production }
これは、多くの異なるプロバイダーに対して何度も複製されます。これを何らかの関数または配列で複製して、何度も宣言する必要がないようにする方法はありますか?