Before we finish off the chapter, let's look at some more example code running in Fission, starting with a weather checker.
Some more examples
Weather
In the /Chapter08/weather/ folder of the repository, you will find weather.js. This is a simple Node.js function that queries the Yahoo weather API to return the current weather for a given location:
'use strict';
const rp = require('request-promise-native');
module.exports = async function (context) {
const stringBody = JSON.stringify(context.request.body);
const body = JSON.parse(stringBody);
const location = body.location;
if (!location) {
return {
status: 400,
body: {
text: 'You must provide...