diff --git a/.gitignore b/.gitignore index 063b0e4..c8b9476 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ db.json *.log node_modules/ public/ -.deploy*/ \ No newline at end of file +.deploy*/ +hexo-blog.zip \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..119d2c2 --- /dev/null +++ b/app.js @@ -0,0 +1,21 @@ +var spawn = require('child_process').spawn; + +free = spawn('hexo', ['server', '-p 4000']); + +free.stdout.on('data', function (data) { + + console.log('standard output:\n' + data); + +}); + +free.stderr.on('data', function (data) { + + console.log('standard error output:\n' + data); + +}); + +free.on('exit', function (code, signal) { + + console.log('child process eixt ,exit:' + code); + +}); \ No newline at end of file diff --git a/pack.sh b/pack.sh new file mode 100755 index 0000000..00a58ef --- /dev/null +++ b/pack.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "正在打包..." +zip -ry -q ./hexo-blog.zip ./ -x "./node_modules/*" -x "./package-lock.json" -x "./wordpress.2020-11-13.xml" -x "./hexo-blog.zip" -x "./db.json" +echo "打包完成!"