1.0.0 • Published 6 years ago

exframe-web v1.0.0

Weekly downloads
5
License
ISC
Repository
-
Last release
6 years ago

exframe-web

Simple static file server for harmony projects

package.json

{
  ...
  "scripts": {
    ...
    "server": "npm run build && exframe-web",
    ...
  }
  ...
}

exframewebrc

{
  "server": {
    "rootPath": "./build"
  }
}

Installation

$ npm install --save exframe-web

Running

$ ./node_modules/.bin/exframe-web

Configuration

As exframe-web is an application you configure it with an rc file and environment variables.

environment variables

  • PORT - The port the server will listen on

exframewebrc

  • server - static-server configuration see static-server
  • headers - dictionary of static headers to be applied to every request
    • default headers (can be overridden):
      • access-control-allow-origin = "*"
      • X-Frame-Options = "SAMEORIGIN"
      • X-Content-Type-Options = "nosniff"
      • X-XSS-Protection = "1; mode=block"