decentralized-internet
Version:
An NPM library of programs to create decentralized web and distributed computing projects
1 lines • 452 B
JavaScript
const fs=require("fs"),path=require("path");exports.plugin={},exports.plugin.register=async function(e,t){e.path(__dirname),e.route({path:"/",method:"*",handler:function(e,t){return t.redirect("/public")}}),e.route({path:"/public/{path*}",method:"GET",config:{handler:{directory:{path:"./clusterpost-public/build",listing:!1,index:!0}},description:"This route serves the static website of clusterpost."}})},exports.plugin.pkg=require("./package.json");