うちのいぬ Tech Blog

Tech Blog of Uchinoinu/My dog

Introduction: PART 1: Generate Project using template. Watch app at localhost, iOS simulator, heroku

Screen Shot 2015-04-14 at 14.33.20.png

Condition

Install

read: http://ionicframework.com/getting-started/

$ npm install -g cordova ionic

Select Project Template

read: http://ionicframework.com/getting-started/

Screen Shot 2015-04-14 at 14.34.04.png

$ ionic start myApp sidemenu

run

ionic command

Screen Shot 2015-04-14 at 14.30.08.png

localhost

$ ionic serve

Screen Shot 2015-04-14 at 14.29.47.png

Screen Shot 2015-04-14 at 14.30.15.png

Screen Shot 2015-04-14 at 14.29.59.png

ios simulator

$ npm install -g ios-sim
$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios

Screen Shot 2015-04-14 at 15.02.30.png

heroku

read: http://blog.ionic.io/heroku-ionic/

Screen Shot 2015-04-14 at 14.40.40.png

Screen Shot 2015-04-14 at 14.21.11.png

package.json

"dependencies": {
    "express": "4.8.4", <--- add this line

web.js

var express = require('express');
var app = express();
 
app.use(express.static(__dirname + "/www"));
app.listen(process.env.PORT || 5000);

Procfile

web: node web.js

heroku dyno

$ heroku ps:scale web=1

deploy

$ git push heroku master

check

http://hogehoge.herokuapp.com

references