In the following example, we will be building an application in which our now familiar function baseline code will consume an external data source (based on JSON) and output a view rendered against an HTML template.
Building a static website
Provisioning the environment
We have seen this type of layout used previously in other Node.js applications (for example, Chapter 3, Introducing Lightweight Functions and Chapter 4, Developing Cloud Functions), so in this chapter, the focus will be on building the code necessary to build our website.
To begin, follow these steps:
- Make a brand new directory in which to host our code.
- Within the new directory, initialize the environment by performing npm init --yes at the command line to...