56.
質問に答えていきます
? What would you like to write scripts with?
›❯ JavaScript
? What would you like to write markup with?
›❯ HTML
? What would you like to write stylesheets with?
›❯ CSS
57.
質問に答えていきます
? What Angular router would you like to use?
›❯ uiRouter
? Would you like to include Bootstrap?
n
? Would you scaffold out
an authentication boilerplate?
n
58.
質問に答えていきます
? Would you like to use mongoDB with Mongoose
for data modeling?
y
? Would you like to use socket.io?
Y
→ サーバとクライアントのコードを⾃自動⽣生成。
依存モジュールをインストール
61.
ディレクトリ構成
server
client
dist
e2e
Node.js で動くウェブサーバのコード群
ブラウザにサーブする HTML, JavaScript, CSS
End To End テストのためのコード
build:dist or serve:dist 実⾏行行時に作られる。
production 環境⽤用のアセットを配置。
62.
server
app.js
routes.js
サーバ起動ファイル。
モジュールのインポートに専念念。
HTTP リクエストのルーティング定義。
基本的に触らない。
YEOMAN が全て⾃自動的に更更新してくれます。
→ 詳細を知りたい⼈人は、Express の API ドキュメントを
63.
server
api
⼤大前提:動的なデータは全て API で取得します
resourceName
index.js
resourceName.controller.js
resourceName.model.js
resourceName.socket.js
resourceName.spec.js
64.
server 側の開発
yo angular-fullstack:endpoint resourceName
Model を修正
(必要に応じて Controller, Socket を修正)
(spec を修正。grunt test:server でテスト実⾏行行)
Be the first to comment