retra-static
Serve static files from your retra server, in Node!
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 =
Then enable it through your retra app.
// ... require path module// ...create your retra app app// 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 // This will serve out directories' main.html files (if present) when directories are requested.