GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add changes :arrow_double_up: · avimistry/fullstack-javascript@c328f3f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • chapter6
    • chapter6.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎chapter6/chapter6.md‎

Copy file name to clipboardExpand all lines: chapter6/chapter6.md
+32-22Lines changed: 32 additions & 22 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -314,20 +314,26 @@ Deploying to Microsoft Azure
314314

315315
In order to deploy our "Hello World" application to Microsoft Azure, we must add a Git remote destination that belongs to Azure. You could copy the URI/URL from the Microsoft Azure Portal, and use it with this command:
316316

317-
$ git remote add azure YOUR_AZURE_URI
317+
```
318+
$ git remote add azure YOUR_AZURE_URI
319+
```
318320

319321
Now we should be able to make a push with this command:
320322

321-
$ git push azure master
323+
```
324+
$ git push azure master
325+
```
322326

323327
If everything went okay, you should see success logs in the terminal and
324328
"Hello World" in the browser of your Microsoft Azure Web Site URL.
325329

326330
To push changes, just execute:
327331

328-
$ git add .
329-
$ git commit -m "changing to hello azure"
330-
$ git push azure master
332+
```
333+
$ git add .
334+
$ git commit -m "changing to hello azure"
335+
$ git push azure master
336+
```
331337

332338
A more meticulous guide can be found in the tutorial <http://bit.ly/2LbXQOi>.
333339

@@ -338,10 +344,12 @@ For Heroku deployment, we need to create two extra files: `Procfile` and `packag
338344

339345
The structure of the "Hello World" application looks like this:
340346

341-
/06-hello
342-
-package.json
343-
-Procfile
344-
-server.js
347+
```
348+
/06-hello
349+
-package.json
350+
-Procfile
351+
-server.js
352+
```
345353

346354
`Procfile` is a mechanism for declaring what commands are run by your
347355
application’s dynos on the Heroku platform. Basically, it tells Heroku
@@ -403,19 +411,21 @@ We'll start by creating an empty `mb-server.js` file. After it's there,
403411
let's switch to tests and create the `test.js` file with the following
404412
content:
405413

406-
const http = require('http')
407-
const assert = require('assert')
408-
const querystring = require('querystring')
409-
const util = require('util')
410-
411-
const messageBoard = require('./mb-server')
412-
413-
assert.deepEqual('[{"name":"John","message":"hi"}]',
414-
messageBoard.getMessages())
415-
assert.deepEqual ('{"name":"Jake","message":"gogo"}',
416-
messageBoard.addMessage ("name=Jake&message=gogo"))
417-
assert.deepEqual('[{"name":"John","message":"hi"},{"name":"Jake","message":"gogo"}]',
418-
messageBoard.getMessages())
414+
```js
415+
const http = require('http')
416+
const assert = require('assert')
417+
const querystring = require('querystring')
418+
const util = require('util')
419+
420+
const messageBoard = require('./mb-server')
421+
422+
assert.deepEqual('[{"name":"John","message":"hi"}]',
423+
messageBoard.getMessages())
424+
assert.deepEqual ('{"name":"Jake","message":"gogo"}',
425+
messageBoard.addMessage ("name=Jake&message=gogo"))
426+
assert.deepEqual('[{"name":"John","message":"hi"},{"name":"Jake","message":"gogo"}]',
427+
messageBoard.getMessages())
428+
```
419429

420430
Please keep in mind that this is a very simplified comparison of strings
421431
and not JavaScript objects. So every space, quote, and case matters. You

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.