mirror of
https://github.com/kou029w/http-echo.git
synced 2025-01-18 16:08:13 +00:00
create netlify project files
This commit is contained in:
parent
9921947e1c
commit
b5f546a118
4 changed files with 16 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
|||
/node_modules/
|
||||
/package-lock.json
|
||||
/.env
|
||||
/.netlify/*
|
||||
!/.netlify/functions
|
||||
/.vercel
|
||||
|
|
7
.netlify/functions/app/app.js
Normal file
7
.netlify/functions/app/app.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
const awsServerlessExpress = require("aws-serverless-express");
|
||||
const app = require("../../../index.js");
|
||||
const server = awsServerlessExpress.createServer(app);
|
||||
|
||||
exports.handler = (event, context) => {
|
||||
awsServerlessExpress.proxy(server, event, context);
|
||||
};
|
6
netlify.toml
Normal file
6
netlify.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[build]
|
||||
functions = ".netlify/functions"
|
||||
[[redirects]]
|
||||
from = "/*"
|
||||
to = "/.netlify/functions/app"
|
||||
status = 200
|
|
@ -8,6 +8,7 @@
|
|||
"start": "node -r dotenv/config index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-serverless-express": "latest",
|
||||
"cookie-parser": "latest",
|
||||
"express": "latest",
|
||||
"morgan": "latest",
|
||||
|
|
Loading…
Add table
Reference in a new issue