-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #235 from Lissy93/FEATURE/serverless-functions
[FEATURE] Serverless Functions for CDN Deploys
- Loading branch information
Showing
7 changed files
with
153 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "Dashy", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"license": "MIT", | ||
"main": "server", | ||
"scripts": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* A cloud function that wraps the status checking method, for use on Netlify */ | ||
const statusCheck = require('../status-check'); | ||
|
||
exports.handler = (event, context, callback) => { | ||
const paramStr = event.rawQuery; | ||
statusCheck(paramStr, (results) => { | ||
callback(null, { | ||
statusCode: 200, | ||
body: results, | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* A Netlify cloud function to return a message endpoints that are not available */ | ||
exports.handler = async () => ({ | ||
statusCode: 200, | ||
body: JSON.stringify({ | ||
success: false, | ||
error: 'This action is not supported on Netlify', | ||
}), | ||
}); |