Edit Page

tasks/register/buildProd.js

This Grunt tasklist will be executed instead of build if you run sails www in a production environment, e.g.:

NODE_ENV=production sails www

This generates a folder containing your compiled (and usually minified) assets. The most common use case for this is bundling up files to deploy to a CDN.

This is also useful for building standalone applications with tools like PhoneGap or Electron.

Want to see for yourself?

An example of this file can be found in our sample app repo, here.

Anatomy of a Sails App