5 Star 11 Fork 0

Gitee 极速下载/GitHub-VSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/gao-sun/github-vsc
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
debug-server.js 596 Bytes
一键复制 编辑 原始数据 按行查看 历史
Gao Sun 提交于 4年前 . Setup https debug server
const path = require('path');
const express = require('express');
const serveStatic = require('serve-static');
const { createServer } = require('https');
const { readFileSync } = require('fs');
const staticBasePath = './app';
const app = express();
const server = createServer(
{ key: readFileSync('./cert/localhost-key.pem'), cert: readFileSync('./cert/localhost.pem') },
app,
);
app.use(serveStatic(staticBasePath, { fallthrough: true }));
app.use((_, res) => res.sendFile(path.resolve(__dirname, './app/index.html')));
server.listen(8080, () => console.log('Listening on port 8080'));
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/mirrors/GitHub-VSC.git
git@gitee.com:mirrors/GitHub-VSC.git
mirrors
GitHub-VSC
GitHub-VSC
master

搜索帮助