The NodeChef load balancers can serve static assets eliminating the round trip to the application process. This can significantly improve performance for most applications. The below command can be used to deploy your static assets.
CD into the public folder containing all your static assets
Deploy using the below commanddeploy -i my_app --statics --minify
Static assets are deployed incrementally. This is accomplished using a file with name (__nodechef_statics_track__.set) in the current working directory to track various files and their
modified date and time. You can manually delete this file anytime. Deleting this file, will send all your static assets to the load balancer again.
Run the --statics command only after you CD into the public folder else you might expose your backend
code to the public.
Required. Specify the name of the app to deploy the resources to
Required. Instructs the CLI to deploy all resources in the current working directory to the load balancer
Optional. This flag instructs the CLI to minify all .css and .js resources before shipping to the load balancer. The files in the working directory are however not altered. When .min preceeds the .js or .css extension, the CLI considers these resources as already minified and does not minify.
The CLI uses the yui-compressor for minification.
Optional. In some cases the yui-compressor might give you errors and not minify your asset. In such cases you can instruct the cli to skip minifing this asset. You can specify the -ms switch multiple times.
Optional. Use this flag to override your current statics folder on the server. All resources on the server not currently in the bundle been uploaded will be deleted. Files that already exist will be updated.
Viewing your static assets
You can always browse the files that were uploaded to the server from the App actions > statics hosting section. You will be able to see the exact directory structure, modified date and also delete assets no longer in use