mirror of
https://github.com/learnk8s/learnk8s.io.git
synced 2026-02-14 16:39:52 +00:00
serving certs from the Academy
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,4 +12,5 @@ vendor/
|
||||
_site/
|
||||
.jekyll-metadata
|
||||
.vscode/
|
||||
backstop_data/
|
||||
backstop_data/
|
||||
lambda/
|
||||
16
functions/cert.js
Normal file
16
functions/cert.js
Normal file
@@ -0,0 +1,16 @@
|
||||
exports.handler = function(event, context, callback) {
|
||||
const axios = require('axios')
|
||||
|
||||
axios
|
||||
.get(`https://academy.learnk8s.io${event.path}`)
|
||||
.then(response => {
|
||||
callback(null, {
|
||||
statusCode: 200,
|
||||
body: response.data,
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('Error', error)
|
||||
callback('Error')
|
||||
})
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
base = "."
|
||||
publish = "_site"
|
||||
command = "npm install && npm test && npm run fmt && npm run build"
|
||||
functions = "lambda"
|
||||
[context.deploy-preview]
|
||||
command = "npm install && npm test && mkdir -p _site && echo -e \"\nDisallow: /\" >> _site/robots.txt && npm run fmt && npm run build"
|
||||
[context.deploy-preview.environment]
|
||||
|
||||
4540
package-lock.json
generated
4540
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,9 @@
|
||||
"build": "ts-node --files --transpile-only src/index.tsx",
|
||||
"fmt": "ts-node --files --transpile-only src/check.ts",
|
||||
"test": "cross-env tsc --noEmit && ts-node --files node_modules/tape/bin/tape \"src/**/test.ts\" \"src/**/*.test.ts\" \"src/**/*.integration.ts\" \"src/**/integration.ts\"",
|
||||
"start": "ts-node --files --transpile-only src/start.ts"
|
||||
"start": "ts-node --files --transpile-only src/start.ts",
|
||||
"lambda-serve": "netlify-lambda serve functions",
|
||||
"lambda-build": "netlify-lambda build functions"
|
||||
},
|
||||
"author": "Learnk8s",
|
||||
"license": "UNLICENSED",
|
||||
@@ -48,6 +50,7 @@
|
||||
"md5": "^2.2.1",
|
||||
"mdast-util-to-string": "^1.0.6",
|
||||
"mjml": "^4.5.1",
|
||||
"netlify-lambda": "^1.6.3",
|
||||
"opentype.js": "^1.1.0",
|
||||
"postcss": "^7.0.14",
|
||||
"prettier": "^1.19.1",
|
||||
|
||||
Reference in New Issue
Block a user