OBSOLETE Http host for anvil.js

Provides an integrated web host using express and Extends anvil with functionality to allow other plugins to host features and content.

This plugin requires anvil.js version 0.8.* or greater.

anvil install anvil.http
anvil --host

Configuration can be changed by adding any of the three properties to the build file under "anvil.http": {}.

A hash where the key is the extension of the requested file and the value is the mimeType specification. In general, this is only necessary if you're adding support for a file extension that needs to be compiled on the fly.

Example: "contentTypes": { ".coffee": "application/javascript" }

Specifies what port the server will listen to. The default is 3080.


"port": 3080

A hash where the key is the relative url to map to a specific directory or file. The following example shows the default setting which causes the output directory to get mapped to the top level.


"paths": {
    "/": anvil.config.output

Currently the only call that this plugin adds to anvil is registerPath.

This lets you register static files to serve at a specific relative url