From 9553194134a22a687c3cec0e49570acdf75e5e13 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 23 May 2018 15:36:59 -0400 Subject: [PATCH] Simplify JS and use HTML standard (#91) --- compute/startup-script/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compute/startup-script/index.js b/compute/startup-script/index.js index 6f495e2361..27ccbacb61 100644 --- a/compute/startup-script/index.js +++ b/compute/startup-script/index.js @@ -39,9 +39,9 @@ function createVm(name, callback) { apt-get update apt-get install -y apache2 cat < /var/www/html/index.html -

Hello World

-

This page was created from a simple start up script!

- `, + +

Hello World

+

This page was created from a simple start-up script!

`, }, ], }, @@ -62,8 +62,8 @@ function createVm(name, callback) { const metadata = data[0]; // External IP of the VM. - const ip = metadata['networkInterfaces'][0]['accessConfigs'][0]['natIP']; - console.log('Booting new VM with IP http://' + ip + '...'); + const ip = metadata.networkInterfaces[0].accessConfigs[0].natIP; + console.log(`Booting new VM with IP http://${ip}...`); // Ping the VM to determine when the HTTP server is ready. let waiting = true;