grunt-haibu

Deploy app to haibu server

npm install grunt-haibu
4 downloads in the last day
37 downloads in the last week
68 downloads in the last month

grunt-haibu

Grunt haibu client

Getting Started

This plugin requires Grunt ~0.4.0

npm install grunt-haiub --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-haibu');

Refer to Gruntfile.js.

example:

        haibu: {
            options: {

                // Haibu server protocol. (Default: http)
                haibuProtocol: 'http',

                // Haibu server domain name. (Required)
                haibuDomain: 'localhost',

                // Haibu server subdomain name. (Optional)
                // haibuSubdomain: 'deploy',

                // Haibu server port. (Default: 80)
                haibuPort: 9002,

                // Haibu user.
                userName: 'node',

                // Override package.json's app property. (Optional)
                appName: '',

                /*
                 * This directory will be used to find package.json for normal mode,
                 * and cwd for static mode. (Default: '.')
                 */
                path: './test/fixtures/hellonode',

                // Start script which is auto-generated by haibu deployment system. (Default: 'start.js')
                startScript: 'start.js',

                // File specifies file to deploy. (Default: .haibuinclude)
                includeFile: '.haibuinclude',

                // Task which should run before deployment. (Optional)
                prevTask: 'clean',

                // Print result with target as subdomain when deploy is finished. (Default: false)
                subdomainEqualsToTarget: true
            },
            test1: {
                options: {

                    /*
                     * Deploy mode.
                     *
                     * 'normal' mode is used for most node apps which has script to run.
                     * The init script must be specified in options.initScript.
                     *
                     * 'static' mode is used for static deployment.
                     * Directory to server must be specified in options.staticDir.
                     */
                    mode: 'normal',

                    // Port to deploy.
                    port: 11000,

                    // Starting point. this used in normal mode. (Required)
                    initScript: 'server.js',

                    // Custom subdomain. (Optional)
                    //subdomain: ''
                }
            },
            test2: {
                options: {
                    mode: 'static',
                    port: 11010,

                    // Directory to serve, relative to options.path (Required)
                    staticDir: '.'
                }
            }
        },
npm loves you