Skip to content

Instantly share code, notes, and snippets.

@saigowthamr
Created May 29, 2018 01:05
const serverless = require("serverless-http");
const hbs = require("hbs");
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
// parse application/json
app.use(bodyParser.json());
app.set("view engine", "hbs");
app.get("/", function(req, res) {
res.status(200).render("index");
});
module.exports.gallery = serverless(app);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment