scottcorgan / pushstate-server

Static file server that works with HTML5 Pushstate.
421 stars 35 forks source link

Return underlying server after calling listen #26

Closed geelen closed 8 years ago

geelen commented 8 years ago

This is so you can call:

const pushstate = require('pushstate-server');
const server = pushstate.start({
  port: 2999,
  directories: ['./build']
});
/* some time later */
server.close()

Useful for something I'm building. Otherwise the only way to quit the server is to send an INT (I think...)

scottcorgan commented 8 years ago

Great! Released as 1.12.0

geelen commented 8 years ago

Now that's a quick turnaround! 😄