This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

retra-static

1.0.2 • Public • Published

retra-static

Serve static files from your retra server, in Node!

GitHub | NPM

Install

npm i retra-static

About retra

retra is a powerful, lightweight, and extensible Node.js HTTP server framework.

Use retra-static

First, require the extension.

const static = require('retra-static')

Then enable it through your retra app.

// ... require path module
// ...create your retra app
 
app.use(static(path.join(__dirname, 'static')))
// This will instruct retra-static to serve out files from the /static directory

Use a custom index file name

The index file for directories defaults to index.html.

app.use(static(path.join(__dirname, 'static')), 'main.html')
 
// This will serve out directories' main.html files (if present) when directories are requested.

Readme

Keywords

none

Package Sidebar

Install

npm i retra-static

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

13 kB

Total Files

9

Last publish

Collaborators

  • ethan_