iora-static

2.1.0 • Public • Published

static

A small module for implementing a static aspect into your server.

Usage:

To use this, you must first install it wherever your iora server is being deployed, or globally:

npm install iora-static

From here, you'd add it to your "middleware" array in your configuration file for your iora server:

{
  ...
  "middleware": [
    "iora-static"
  ]
  ...
}

Once added, at the base of your iora config, you add "static" to your "base" object (this is the directory that will be static), and a "static" objcet at the root:

{
  ...
  "middleware": [
    "iora-static"
  ],
  ...
  "base": {
    ...
    "static": "/path/to/some/folder"
  },
  ...
  "static": {
    "url": "/resources",
    "options": {
      "dotfiles": "deny"
    }
  }
}

Readme

Keywords

Package Sidebar

Install

npm i iora-static

Weekly Downloads

0

Version

2.1.0

License

MIT

Last publish

Collaborators

  • npm