Skip to content
Snippets Groups Projects
  • Lucas Roesler's avatar
    0fef825f
    Add support to specify secrets in services · 0fef825f
    Lucas Roesler authored
    
    **What**
    - During function creation, accept an array of strings defining swarm secrets
    that are required for the service
    - Update docs
    - Add new guide on using the secrets capability
    - Add new sample function to highlight using environment variables
    - Update `ApiKeyProtected` sample function to utilize the new secrets
    capabilities
    
    **Why**
    - This allows secrets to remain encrypted at rest instead of being unencrypted
    in environment variables and yaml files.
    
    Fixes #285
    
    Signed-off-by: default avatarLucas Roesler <lucas.roesler@gmail.com>
    0fef825f
    History
    Add support to specify secrets in services
    Lucas Roesler authored
    
    **What**
    - During function creation, accept an array of strings defining swarm secrets
    that are required for the service
    - Update docs
    - Add new guide on using the secrets capability
    - Add new sample function to highlight using environment variables
    - Update `ApiKeyProtected` sample function to utilize the new secrets
    capabilities
    
    **Why**
    - This allows secrets to remain encrypted at rest instead of being unencrypted
    in environment variables and yaml files.
    
    Fixes #285
    
    Signed-off-by: default avatarLucas Roesler <lucas.roesler@gmail.com>
handler.js 237 B
"use strict"

let getStdin = require('get-stdin');

let handle = (req) => {
    console.log("Hello from a " + process.env.NODE_ENV + " machine")
};

getStdin().then(val => {
   handle(val);
}).catch(e => {
   console.error(e.stack);
});