Skip to Content
Node.js 6.x Blueprints
book

Node.js 6.x Blueprints

by Fernando Monteiro
August 2016
Intermediate to advanced
376 pages
6h 33m
English
Packt Publishing
Content preview from Node.js 6.x Blueprints

Creating the views template

Now let's create the view file. This file is very important for our application, because that is where we integrate the resources of Swig variables with our JavaScript code:

  1. Create a file called locations.html and save it within the app/views/pages/ folder.
  2. Place the following code inside the locations.html file:
     {% extends 'layout.html' %} {% block content %} <div class="section"> <div class="container"> <br><br> <h1 class="header center teal-text">{{ title }}</h1> <div class="row center"> <h5 class="header col s12 light">Welcome to {{ title }} </h5> </div> <div class="row"> <div class="col s12"> <form action="/nearme" method="POST"> <div class="row"> <div class="col s12" id="map" style="height:600px; width: 100%; margin-bottom: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Node.js Development

Learning Node.js Development

Andrew Mead
VB.NET Core Classes in a Nutshell

VB.NET Core Classes in a Nutshell

Budi Kurniawan, Ted Neward
Your First Week With Node.js, 2nd Edition

Your First Week With Node.js, 2nd Edition

James Hibbard, Craig Buckler, Mark Brown, Nilson Jacques, James Kolce, Paul Orac, M. David Green, Florian Rappl

Publisher Resources

ISBN: 9781785888434Supplemental Content