Skip to content

soundcove/app-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

app-server

SoundCove's application server.

Installation

$ npm install --save soundcove/app-server

Usage

var server = require('app-server');
var app = server(opts);

server(opts)

Create an application server.

  • opts (Object): An object of options for the server.
  • opts.html (String): Path to the HTML for the application. (Default: index.html)
  • opts.js (String): Path to the JavaScript for the application. (Default: index.js)
  • opts.css (String): Path to the CSS for the application. (Default: index.css)
  • opts[404] (String): Path to the 404 page for the application. (Default: 404.html)
  • opts.favicon (String): Path to the favicon. (Default: favicon.png)

Returns http.Server.

Example

var app = server({ ...opts });
app.listen(8970, '0.0.0.0', function() {
  console.log('Listening');
});

Credits

soundcove
SoundCove