Skip to content

okteto/openfaas-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Develop an NodeJS function with OpenFaaS and Okteto Cloud

Develop an NodeJS function with OpenFaaS and Okteto Cloud

Run your function in Okteto Cloud

  1. Deploy OpenfaaS from the application catalog.

  2. Install the OpenFaaS cli locally:

    curl -sSL https://cli.openfaas.com | sudo sh
    
  3. Log into your OpenFaaS gateway (get the gateway URL from Okteto Cloud)

     echo $PASSWORD | faas login -g $GATEWAY_URL --password-stdin
    
  4. Update stack.yaml so the image name uses your namespace instead of rberrelleza

  5. Login to the Okteto Registry

     docker login registry.cloud.okteto.net
    
  6. Build and launch your image

     faas-cli up 
    
  7. Verify that everything works fine:

     faas-cli invoke hello
    

Develop your function in Okteto Cloud

  1. Go to the hello folder and launch your development environment. okteto.yml is already configured with everything you need to develop your function:

     cd hello
     okteto up
    
  2. To start your function, just call the fwatchdog process in your remote development environment:

     $ fwatchdog
    
  3. Your changes will be automatically synchronized. Just stop and start the watchdog to see them applied.

TODO:

  1. Update okteto.yaml to use nodemon for automatic reload instead of starting and stopping fwatchdog

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published