This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
/* | |
This function simply returns messages as a JSON in response to any request | |
Definitely not what you would want to have in a production environment, but will suffice for the demo | |
Note the content-type header for 'application/json' | |
*/ | |
context.res = { | |
// status: 200, /* Defaults to 200 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
console.log('Loading function'); | |
exports.handler = (event, context, callback) => { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
/* | |
See what our origin(what domain is making the request) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
/** | |
Retrieve and display the messages | |
**/ | |
class MessageList extends Component { | |
constructor(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.swift | |
// xcodeCli | |
// | |
// Created by Ilia Malchenko on 6/5/17. | |
// Copyright © 2017 M52 Studios, LLC. All rights reserved. | |
// | |
import Foundation |