gulp-serv

0.0.1 • Public • Published

gulp-serv

Build Status David DM

Simple static server for gulpjs. So simple, it only serves files.

Install

npm install gulp-serv --save-dev

Example

gulp.task("server", function(done) {
  serv.start({
    root: __dirname+"/public",
    port: 8080
  }, done);
});

gulp.task("e2e", ["server"], function(done) {
  gulp.src(["./test/e2e/**/*_test.js"])
  .pipe(protractor({
    configFile:  "./protractor.js",
    args:        ["--baseUrl", "http://127.0.0.1:8080"],
  }))
  .on("error", function(e) { throw e; })
  .on("end", function() {
    serv.stop(done);
  });
});

SSL support is initiated by calling secure with paths to your cert files.

var ssl = {
  key:  "...",
  cert: "..."
};

serv.secure(ssl).start({
  root: __dirname+"/public",
  port: 8080
});

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i gulp-serv

Weekly Downloads

8

Version

0.0.1

License

MIT

Last publish

Collaborators

  • yunghwakwon