FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-lambda/examples/nodejs-native-module/index.js at python2.7 · Frameio/docker-lambda · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Frameio
/
docker-lambda
Public
forked from
lambci/docker-lambda
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
12
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-lambda
/
examples
/
nodejs-native-module
/
index.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (14 loc) · 538 Bytes
Breadcrumbs
docker-lambda
/
examples
/
nodejs-native-module
/
index.js
Copy path
File metadata and controls
17 lines (14 loc) · 538 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var
bcrypt
=
require
(
'bcrypt'
)
// Hashed password for "lamda-docker"
var
HASHED_PASS
=
'$2a$10$w9.BRCsnWXv5f.eUGD2fieT.wfLV9.rSJFC/2bzz3sahJdCLaYs0K'
exports
.
handler
=
function
(
event
,
context
,
cb
)
{
console
.
log
(
'hello?'
)
bcrypt
.
compare
(
event
.
password
,
HASHED_PASS
,
function
(
err
,
res
)
{
cb
(
err
,
res
?
'Matches!'
:
'NopeNopeNope'
)
}
)
}
// Just to test this locally:
if
(
require
.
main
===
module
)
{
exports
.
handler
(
{
password
:
'lambda-docker'
}
,
{
}
,
console
.
log
)
exports
.
handler
(
{
password
:
'lambda-mocker'
}
,
{
}
,
console
.
log
)
}
Back
|
FazBrowse Home
|
New Git URL