Skip to content

Instantly share code, notes, and snippets.

@WaleedAshraf
Last active April 20, 2018 20:58

Revisions

  1. WaleedAshraf revised this gist Apr 20, 2018. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions serverless-app-1.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    exports.handler = async (event) => {
    return sendRes(200,'Hello');
    };

    const sendRes = (status, body) => {
    var response = {
    statusCode: status,
    @@ -7,8 +11,4 @@ const sendRes = (status, body) => {
    body: body
    };
    return response;
    }

    exports.handler = async (event) => {
    return sendRes(200,'Hello');
    };
  2. WaleedAshraf revised this gist Apr 19, 2018. No changes.
  3. WaleedAshraf created this gist Apr 19, 2018.
    14 changes: 14 additions & 0 deletions serverless-app-1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    const sendRes = (status, body) => {
    var response = {
    statusCode: status,
    headers: {
    "Content-Type": "text/html"
    },
    body: body
    };
    return response;
    }

    exports.handler = async (event) => {
    return sendRes(200,'Hello');
    };