UNPKG

decentralized-internet

Version:

An NPM library of programs to create decentralized web and distributed computing projects

1 lines 651 B
exports.plugin={},exports.plugin.register=async function(e,r){var t=require("underscore"),i=require("fs"),n=require("path");require("boom");t.each(r.links,function(e,r){var t=n.join(__dirname,r);try{i.statSync(t)}catch(r){try{i.linkSync(e,t)}catch(e){console.error(e)}}}),e.route({path:"/dataprovider-fs/{path*}",method:"GET",config:{auth:{strategy:"token",scope:["clusterpost","executionserver"]},handler:{directory:{path:__dirname,listing:!1,index:!0}},description:"This route serves static folder content for clusterpost. Everything inside this folder will be directly accessible under this route."}})},exports.plugin.pkg=require("./package.json");