参考:
https://thinkjs.org/zh-cn/doc/2.2/create_project.html
$ npm install -g thinkjs@2 [1:00:11]
/usr/local/bin/thinkjs -> /usr/local/lib/node_modules/thinkjs/bin/index.js
+ thinkjs@2.2.19
added 23 packages in 17.493s
$ thinkjs new helloworld
...
create : helloworld/src/home/model
create : helloworld/src/home/model/index.js
create : helloworld/view/home
create : helloworld/view/home/index_index.html
enter path:
$ cd helloworld
install dependencies:
$ npm install
run the app:
$ npm start
$ ls [1:04:50]
README.md nginx.conf package.json pm2.json src view www
$ npm install [1:05:09]
> fsevents@1.1.2 install /Users/caiqiqi/GitProjects/node_repos/helloworld/node_modules/fsevents
> node install
[fsevents] Success: "/Users/caiqiqi/GitProjects/node_repos/helloworld/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN thinkjs-application@1.0.0 No repository field.
added 326 packages in 63.444s
$ npm start [1:07:36]
> thinkjs-application@1.0.0 start /Users/caiqiqi/GitProjects/node_repos/helloworld
> node www/development.js
[2017-07-01 01:08:13] [Babel] Compile file common/bootstrap/global.js 340ms
[2017-07-01 01:08:13] [Babel] Compile file common/bootstrap/middleware.js 6ms
[2017-07-01 01:08:13] [Babel] Compile file common/config/config.js 37ms
[2017-07-01 01:08:13] [Babel] Compile file common/config/db.js 39ms
...
[2017-07-01 01:08:33] [HTTP] GET / 200 40ms
[2017-07-01 01:08:33] [HTTP] GET /favicon.ico 404 38ms
^C