Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
'use strict';
const express = require('express');
const serverless = require('serverless-http');
const app = express();
const bodyParser = require('body-parser');
const cors = require('cors');
const helmet = require('helmet');
const keys = require('./options/secrets.json');
const axios = require('axios');
const router = express.Router();
app.use(cors());'/webhook-link-jira-zendesk', async (req, res) => {
try {
//I do my stuff here
return res.send(object);
} catch (e) {
router.get('/', (req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.write('<h1>Hello from Express.js!</h1>');
app.use('/.netlify/functions/server', router); // path must route to lambda
module.exports = app;
module.exports.handler = serverless(app);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.