# oschina-webhook **Repository Path**: makeup1122/oschina-webhook ## Basic Information - **Project Name**: oschina-webhook - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2016-12-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # oschina-webhook ## 简介 对接git仓库的钩子,配置之后每次git提交,都可以执行一段用来部署环境的脚本 ## 安装 需要运行 npm install -g oschina-webhook 默认启动 oschina-webhook 后台运行: oschina-webhook -d 所有命令选项: Usage: oschina-webhook [options] Options: -h, --help output usage information -V, --version output the version number -p, --port [port] Set the port number to use. Defaults to 9001 -c, --configfile [configfile] Set the path to the config file to be used. Default to ./webhook.json -d, --daemon Run the oschina-webhook as a deamon -s, --stop Stop oschina-webhook that was run as a deamon -l, --log Where to log ## 配置 默认webhook.json配置文件 { "log":"/Users/zzz/Documents/zz_work/oschina-webhook/1.log", "deploy": { "basepath": "/Users/zzz/Documents/zz_work/oschina-webhook", "command": "./1.sh" } } ## 访问 http://localhost:9001/webhook