mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
add test for the serverless express API
This commit is contained in:
@@ -3,3 +3,4 @@
|
||||
| tst3/function/index.js:1:36:1:40 | event |
|
||||
| tst4/app.js:1:36:1:40 | event |
|
||||
| tst5/app.js:1:36:1:40 | event |
|
||||
| tst6/handler.js:6:23:6:36 | req.query.name |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
const serverless = require("serverless-http");
|
||||
const express = require("express");
|
||||
const app = express();
|
||||
|
||||
app.get("/", (req, res, next) => {
|
||||
res.send("Hello " + req.query.name);
|
||||
});
|
||||
|
||||
module.exports.handler = serverless(app);
|
||||
@@ -0,0 +1,16 @@
|
||||
service: aws-node-express-api
|
||||
|
||||
frameworkVersion: '2'
|
||||
|
||||
provider:
|
||||
name: aws
|
||||
runtime: nodejs12.x
|
||||
lambdaHashingVersion: '20201221'
|
||||
|
||||
functions:
|
||||
api:
|
||||
handler: handler.handler
|
||||
events:
|
||||
- http:
|
||||
path: /
|
||||
method: ANY
|
||||
Reference in New Issue
Block a user