Electrode Server Decor to serve static files using inert.
Install
$ npm i electrode-static-paths --save
const electrodeServer = require("electrode-server");
electrodeServer( config, [require("electrode-static-paths")()] );
By default, the static files are served from dist
under CWD.
- Route
/html
will serve files fromdist/html
- Route
/js
will serve files fromdist/js
- Route
/images
will serve files fromdist/images
You can change the prefix dist
with options to the electrodeStaticPaths
plugin:
const config = {
plugins: {
electrodeStaticPaths: {
options: {
pathPrefix: "myfiles"
}
}
}
};
You can also specify configs to be passed to server.route
:
const config = {
plugins: {
electrodeStaticPaths: {
options: {
config: {
}
}
}
}
};
Built with ❤️ by Team Electrode @WalmartLabs.