diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-14 21:47:23 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-14 21:47:23 +0100 |
| commit | 7b56f23b11ef78dafae13495ef878cebaf97f061 (patch) | |
| tree | 5b810d4f0c6bc70b6cde4f207a1d6ec325fab705 /bucky/app/index.js | |
| parent | fcf86a6e78fd6631dbc6b2046f4aff7cf08eef8a (diff) | |
js minify process for production
Diffstat (limited to 'bucky/app/index.js')
| -rw-r--r-- | bucky/app/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bucky/app/index.js b/bucky/app/index.js index b600935..71b2d57 100644 --- a/bucky/app/index.js +++ b/bucky/app/index.js @@ -69,6 +69,11 @@ site.init = function(){ app.set('view engine', 'ejs') app.set('views', path.join(__dirname, '../../views')) app.use(express.static(path.join(__dirname, '../../public'))) + + // rebuild javascript after restarting server + if (process.env.NODE_ENV === 'production') { + require('../bin/build-scripts') + } } site.route = require('./router') |
