Академический Документы
Профессиональный Документы
Культура Документы
An example walkthrough
In other words, Cloud computing is a general term for the delivery of hosted
services over the Internet.
Characteristics of Cloud Computing
Their service lets app developers spend their time on their application code, not
managing servers, deployment, ongoing operations, or scaling.
Heroku - Features
● Build and Run Your Apps, Your Way.
○ Add-ons
○ Buildpacks
○ Config
○ Run
● Deploy your app quickly, easily and with options that work for you.
○ Deploy with Git
○ Heroku Fork
○ Releases
○ Regions
Heroku - Features
● Scale with ease, when you need to
Heroku lets you grow quickly to support user growth, traffic spikes and new features.
● Dyno Size
● Scale easily
● Addons: upgrade
● Dashboard scale
Heroku - Features
● Get comprehensive visibility and monitoring.
○ Heroku Logs
○ Monitoring add-ons
○ Status
● Heavy Duty Tools
○ Dashboard
○ Toolbelt CLI
Heroku - Setup
Download HerokuToolbelt for
● Mac OS X
● Windows
● Debian/Ubuntu
● Standalone
This provides you access to the Heroku Command Line utility, as well as git and Foreman, tools you’ll use in later
steps.
Link: https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up
Login:
$ heroku login
Heroku - App Concepts
What is a Procfile?
A Procfile is a text file which is put in the application root directory. It lists the process types such as ‘web’, ‘worker’ in
an application.
Define a Procfile:
The above line declares a singles process type, web and the command required to run it. It is important to declared the
name web here as this process will be attached to the HTTP routing stack of Heroku and will receive web traffic upon
deploying.
web:
This special process type receives HTTP traffic from Heroku’s routers.
Heroku - App Concepts
Package.json:
Create a package.json file to list download all your node module dependencies. When you deploy your app in Heroku,
the platform will run ‘npm install’ command to install all the specified node modules.
Foreman:
It is a service that manages processes (specified in Procfile) for an application to run properly. In other words, it
manages profile-based applications. It will start all of the processes associated with your app and display stdout and
stderr of each process. Processes are color-coded by type to make them easy to read. $PORT will be automatically
assigned by foreman and made available to each underlying process.
Heroku - App Deployment
Prepare the App (without DB Interaction):
$ cd node-js-getting-started
$ heroku create
Now visit the app at the URL generated by its app name. As a handy shortcut, you can open the website as follows:
$ heroku open
Heroku - App Deployment
Deploying Local folder(without DB Interaction):
cd <<FOLDER_NAME>>
$ git init
$ git add .
$ heroku create
Slides are prepared after attending, reading & using resources from Internet. Credit goes to everyone in preparing it.