Skip to content

Commit

Permalink
Simplify JS and use HTML standard (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhinkel authored May 23, 2018
1 parent b1810ca commit 9553194
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compute/startup-script/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ function createVm(name, callback) {
apt-get update
apt-get install -y apache2
cat <<EOF > /var/www/html/index.html
<html><body><h1>Hello World</h1>
<p>This page was created from a simple start up script!</p>
</body></html>`,
<!doctype html>
<h1>Hello World</h1>
<p>This page was created from a simple start-up script!</p>`,
},
],
},
Expand All @@ -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;
Expand Down

0 comments on commit 9553194

Please sign in to comment.