| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

差分

ナビゲーションに移動 検索に移動
774 バイト追加 、 2020年10月21日 (水) 14:06
===アプリケーション生成===
*https://expressjs.com/ja/starter/generator.html
*Install====インストール====
<pre>
$ npm install -g express-generator
</pre>
 
*Help
<pre>
*テンプレートエンジン
**[https://pugjs.org/api/getting-started.html Pug],[https://www.npmjs.com/package/ejs EJS],[https://www.npmjs.com/package/jade jade]
 
====生成====
<pre>
$ express --view=pug testapp
 
create : testapp/
create : testapp/public/
create : testapp/public/javascripts/
create : testapp/public/images/
create : testapp/public/stylesheets/
create : testapp/public/stylesheets/style.css
create : testapp/routes/
create : testapp/routes/index.js
create : testapp/routes/users.js
create : testapp/views/
create : testapp/views/error.pug
create : testapp/views/index.pug
create : testapp/views/layout.pug
create : testapp/app.js
create : testapp/package.json
create : testapp/bin/
create : testapp/bin/www
 
change directory:
$ cd testapp
 
install dependencies:
$ npm install
 
run the app:
$ DEBUG=testapp:* npm start
 
</pre>

案内メニュー