Guest User

Untitled

a guest
Jan 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. 'use strict';
  2.  
  3. const compressor=require('node-minify');
  4.  
  5. const start=Date.now();
  6.  
  7. compressor.minify({
  8. compressor: 'gcc',
  9. input: 'server.js',
  10. output: 'server-min.js',
  11. sync: false,
  12. callback: function(err, min) {
  13. console.log('callback at '+(Date.now()-start)+'ms');
  14. if(err)
  15. console.log(err);
  16. }
  17. });
  18. console.log('next instruction at '+(Date.now()-start)+'ms');
  19.  
  20. next instruction at 60390ms
  21. callback at 60408ms
  22.  
  23. next instruction at 18ms
  24. callback at 60408ms
Add Comment
Please, Sign In to add comment