iT邦幫忙

DAY 16
1

Front to Back, Node.js系列 第 16

Express 基本範例建立 - Node.js Day 15

  • 分享至 

  • twitterImage
  •  

這次將會介紹 Express 如何在 Web application 裡面應用,其中會介紹到如何使用簡單的 cli mode ,建立整個應用的雛形。
#Express 基本範例建立 - Node.js Day 15

這次將會介紹 Express 如何在 Web application 裡面應用,其中會介紹到如何使用簡單的 cli mode ,建立整個應用的雛形。

	express --help

輸入指令之後,會看到訊息許多訊息,通常我比較建議大家使用 ejs ,作為 view 的開發,因此剛開始整個 project 在建立的時候,可以使用

express -e project_name

在這邊 project name 先輸入 forum,

express -e forum

可以看到輸出結果如下,

<pre>

Usage: express [options]

Options:

-h, --help output usage information
-V, --version output the version number
-s, --sessions add session support
-e, --ejs add ejs engine support (defaults to jade)
-J, --jshtml add jshtml engine support (defaults to jade)
-H, --hogan add hogan.js engine support
-c, --css <engine> add stylesheet <engine> support (less|stylus) (defaults to plain css)
-f, --force force on non-empty directory

</pre>


上一篇
MongoHQ 環境申請 - Node.js 14 Day
下一篇
Express 進階路由程式 - Node.js 16 Days
系列文
Front to Back, Node.js21
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言