Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[bin] Added bin/server

  • Loading branch information...
commit acbca3b3369d2598c0f2392a4a8a1f730a11020b 1 parent 670f9ab
Charlie Robbins indexzero authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 bin/server
21 bin/server
View
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+
+var port = process.env.PORT || process.env.C9_PORT || 8080;
+
+var server = require('http-server').createServer({
+ root: './public/',
+ ext: 'html'
+});
+
+server.listen(process.env.PORT || process.env.C9_PORT || 8080, function () {
+ console.log('Starting up http-server, serving '
+ + server.root
+ + ' on port: '
+ + port);
+ console.log('Hit CTRL-C to stop the server');
+});
+
+process.on('SIGINT', function() {
+ console.log('http-server stopped.');
+ return process.exit();
+});
Please sign in to comment.
Something went wrong with that request. Please try again.