npm install -g truffle
{
"API": {
"HTTPHeaders": {
"Access-Control-Allow-Methods": [
"POST",
"GET"
],
"Access-Control-Allow-Origin": [
"http://localhost:3000", # 运行本地3000端口跨域访问(可根据运行的Dapp实际端口号配置)
"https://webui.ipfs.io",
"http://127.0.0.1:5001"
]
}
}
}
......
}
// 安装依赖
yarn install
// 启动项目
npm start