2 Star 6 Fork 1

李凤禄 / inmap

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
openServer.js 502 Bytes
一键复制 编辑 原始数据 按行查看 历史
fenglu.li 提交于 2018-07-27 10:10 . 打包优化
const open = require('opn');
let httpServer = require('http-server');
let server = httpServer.createServer({
root: './',
robots: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': 'true'
}
});
server.listen(8088);
let url = 'http://localhost:8088/examples/index.html';
console.log('open ', url);
open(url, {}).catch(() => {
console.log('If you are running in a headless environment, please do not use the open flag.');
});
1
https://gitee.com/LiFengLu/inmap.git
git@gitee.com:LiFengLu/inmap.git
LiFengLu
inmap
inmap
master

搜索帮助