Angular fullstackをHerokuにデプロイする
アプリ登録
herokuアカウント取得
herokuツールインストール //herokuコマンドを使えるようにする
herokuにクレカ情報を登録 //アドオンのため。Vプレカでもよい。
アプリフォルダでyo angular-fullstack:heroku
アプリ名とリージョンを決める
distフォルダが作られる
distフォルダでheroku addons:create mongolab //mongodbを使う
distフォルダでheroku open //アプリがブラウザ起動
アプリ更新
アプリフォルダでgrunt build
distフォルダでgitプッシュ
git add .
git commit -am “comment”
git push heroku master
エラー対応
クレカ登録されてない
! Please verify your account to install this add-on plan (please enter a credit card) For more information, see https://devcenter.heroku.com/categories/billing Verify now at https://heroku.com/verify
対策:クレカ登録する
herokuコマンドでアプリが特定できない
! No app specified. ! Run this command from an app folder or specify which app to use with --app APP.
対策:distフォルダに移動してコマンドを打つ
なんかよくわからないエラー
yo angular-fullstack:heroku Error angular-fullstack:heroku You don't seem to have a generator with the name angular-fullstack:heroku installed. You can see available generators with npm search yeoman-generator and then install them with npm install [name]. To see the 0 registered generators run yo with the `--help` option.
対策:インストールしなおす
npm install -g yo npm install -g generator-angular-fullstack













