0.4.0 • Published 3 years ago

cubx-grunt-http-server v0.4.0

Weekly downloads
48
License
-
Repository
github
Last release
3 years ago

cubx-grunt-http-server

Grunt integration to serve local static files and getting non-local dependencies from given remote. This grunt task is part of the Cubbles Development Tools.

Wan't to get to know the Cubbles Platform?

Usage

grunt.initConfig({
  'cubx-http-server': {
      'dev': {
          // the server root directory
          root: 'public',

          // the server port
          // can also be written as a function, e.g.
          // port: function() { return 8282; }
          // default is '8080'
          port: 8282,

          // the host ip address
          // If specified to, for example, '127.0.0.1' the server will
          // only be available on that ip.
          // Specify '0.0.0.0' to be available everywhere
          host: 'localhost',

          cache: 1,
          showDir: true,
          autoIndex: true,

          // server default file extension
          ext: 'html',

          // run in parallel with other tasks
          runInBackground: false,

          // specify a logger function. By default the requests are
          // sent to stdout.
          logFn: function (req, res, error) {
          },

          // Proxies all requests which can't be resolved locally to the given url
          // Note this this will disable 'showDir'
          proxy: 'http://www.example.com',

          // open browser after start
          openBrowser: true,

          // set networkProxyUrl if you need to connect to given proxy server using a proxy
          // Note: depending wether your 'proxy' property above points to a https or http target be sure that the given
          // networkProxyUrl can handle the protocol (https or http)!
          // networkProxyUrl: '[proto]://[host]:[port]' e.g. 'http://proxy:1234'
      }
  }
})
0.4.0

3 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago