web-site is a wrapper for Express that adds the things it boneheadedly leaves out by default:
var WebSite = var site = sitesitestart4100site
Why
In the name of modularity, Express has stopped doing basic web server things by default. Like stopping. Or parsing form data. Or handling AJAX requests. These things are the most basic, fundamental activities of a web server, it's OK to load them by default.
Features
- Parses submitted forms by default
- Parses JSON forms by default
- Parses cookies by default
- site.stop()
- site.isStarted()
- site.getPort()
BYOHS (Bring Your Own HTTP Server)
If you want to tell the web site to use a different http server, you can ask it to relinquish control of starting and stopping:
var site = site site
See get-socket for an example.
sendFile
A method for static files is included just so you don't have to include the path module:
site
Probably a better idea than opening up a whole static folder that could be full of anything.