Skip to content

Instantly share code, notes, and snippets.

View imalchenko's full-sized avatar

Ilia Malchenko imalchenko

View GitHub Profile
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 */
'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)
*/
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
/**
Retrieve and display the messages
**/
class MessageList extends Component {
constructor(props) {
@imalchenko
imalchenko / main.swift
Created June 5, 2017 14:18
Code update for Swift 3
//
// main.swift
// xcodeCli
//
// Created by Ilia Malchenko on 6/5/17.
// Copyright © 2017 M52 Studios, LLC. All rights reserved.
//
import Foundation