使用 FileServer 为我的单个 html 页面提供服务

我正在尝试构建一个示例 Web 应用程序来演示 休息 使用技术  在后端,服务 json 基于请求和 javascript查询在前端(我没有使用html/template包)。

文件服务器 "returns a handler that serves HTTP requests with the contents of the file system rooted at root."

假设我要发布static包含一些 文件的文件夹index.htmlscripts文件夹javascript

如何防止客户端查看我的js文件(仅发布index.htmlat /)?


拉丁的传说
浏览 223回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go