@2890594972
2017-12-25T04:13:50.000000Z
字数 3571
阅读 911
云服务器 sina
http://www.saebbs.com/forum.php?mod=viewthread&tid=37798

PS D:\bw\1506\sina\anli> npm init...Press ^C at any time to quit.package name: (anli)version: (1.0.0)description: anlientry point: (index.js)test command: startgit repository: (https://git.sinacloud.com/anli)keywords:author: daxianglicense: (ISC)...Is this ok? (yes) yes

// server.jsvar express = require('express')var app = express()// 静态 html 页面,需要将当前目录下的所有文件都设置为 staticapp.use(express.static(__dirname + '/static/'));app.get('/', function (req, res) {console.log('start server');// sendFile 函数,在有 request 访问时,将当前目录下的 index.html 文件作为 response 返回res.sendFile(__dirname + '/index.html');console.log('start success');})// 监听 8000 端口app.listen(process.env.PORT || 8000)

daxiang@daxiang MINGW64 /d/bw/1506/sina/anli (master)$ git statusOn branch masterYour branch is based on 'origin/master', but the upstream is gone.(use "git branch --unset-upstream" to fixup)Changes to be committed:(use "git reset HEAD <file>..." to unstage)new file: README.mdnew file: config.yamlnew file: index.jsnew file: package-lock.jsonnew file: package.jsondaxiang@daxiang MINGW64 /d/bw/1506/sina/anli (master)$ git add .daxiang@daxiang MINGW64 /d/bw/1506/sina/anli (master)$ git commit -m 'add hello world'[master d1530f6] add hello world5 files changed, 421 insertions(+)create mode 100644 README.mdcreate mode 100644 config.yamlcreate mode 100644 index.jscreate mode 100644 package-lock.jsoncreate mode 100644 package.jsondaxiang@daxiang MINGW64 /d/bw/1506/sina/anli (master)$ git push originCounting objects: 11, done.Delta compression using up to 8 threads.Compressing objects: 100% (11/11), done.Writing objects: 100% (11/11), 5.55 KiB | 1.39 MiB/s, done.Total 11 (delta 0), reused 0 (delta 0)remote: 导出 Git 代码中...remote: 构建程序中...-----> Node.js app detected-----> Creating runtime environmentNPM_CONFIG_LOGLEVEL=errorNPM_CONFIG_PRODUCTION=trueNODE_ENV=productionNODE_MODULES_CACHE=true-----> Installing binariesengines.node (package.json): 5.9.0engines.npm (package.json): unspecified (use default)Downloading and installing node 5.9.0...Using default npm version: 3.7.3-----> Restoring cacheSkipping cache restore (new runtime signature)-----> Building dependenciesPruning any extraneous modulesInstalling node modules (package.json)nodejs-getting-started@0.0.1 /tmp/build`-- express@4.16.2+-- accepts@1.3.4| +-- mime-types@2.1.17| | `-- mime-db@1.30.0| `-- negotiator@0.6.1+-- array-flatten@1.1.1+-- body-parser@1.18.2| +-- bytes@3.0.0| +-- http-errors@1.6.2| | +-- inherits@2.0.3| | `-- setprototypeof@1.0.3| +-- iconv-lite@0.4.19| `-- raw-body@2.3.2+-- content-disposition@0.5.2+-- content-type@1.0.4+-- cookie@0.3.1+-- cookie-signature@1.0.6+-- debug@2.6.9| `-- ms@2.0.0+-- depd@1.1.1+-- encodeurl@1.0.1+-- escape-html@1.0.3+-- etag@1.8.1+-- finalhandler@1.1.0| `-- unpipe@1.0.0+-- fresh@0.5.2+-- merge-descriptors@1.0.1+-- methods@1.1.2+-- on-finished@2.3.0| `-- ee-first@1.1.1+-- parseurl@1.3.2+-- path-to-regexp@0.1.7+-- proxy-addr@2.0.2| +-- forwarded@0.1.2| `-- ipaddr.js@1.5.2+-- qs@6.5.1+-- range-parser@1.2.0+-- safe-buffer@5.1.1+-- send@0.16.1| +-- destroy@1.0.4| `-- mime@1.4.1+-- serve-static@1.13.1+-- setprototypeof@1.1.0+-- statuses@1.3.1+-- type-is@1.6.15| `-- media-typer@0.3.0+-- utils-merge@1.0.1`-- vary@1.1.2-----> Caching buildClearing previous node cacheSaving 2 cacheDirectories (default):- node_modules- bower_components (nothing to cache)- nodegyp_lib (nothing to cache)-----> Build succeeded!`-- express@4.16.2-----> Discovering process typesDefault types for -> web-----> Compiled slug size is 13Mremote: Generating docker image...remote: Pushing image registry.docker.sae.sina.com.cn/anli:d1530f6 .....remote: 部署程序中 ..........To https://git.sinacloud.com/anli* [new branch] master -> master
