Coder Social home page Coder Social logo

holgerkyas / functions-recipes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trailheadapps/functions-recipes

0.0 1.0 0.0 2.4 MB

Functions Recipes is a library of examples to help you getting started with Salesforce Functions and get used to their main features.

License: Creative Commons Zero v1.0 Universal

Apex 1.34% HTML 10.90% JavaScript 64.80% CSS 3.37% Java 18.05% TypeScript 1.54%

functions-recipes's Introduction

Functions Recipes

CI Workflow codecov lerna

Functions Icon

Introduction

Salesforce Functions lets you use the Salesforce Platform for building event-driven, elastically scalable apps and experiences. Salesforce Functions is designed to boost developer productivity by reducing your infrastructure responsibilities and enabling you to build and integrate Functions-as-a-Service (FaaS) apps using the languages and tools of your choice.

Functions Recipes is a library of examples to help you getting started with Salesforce Functions and get used to their main features.

Note This feature is a Beta Service. Customers may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

If you want to be part of the Invite Beta Service, please nominate yourself.

To learn more about Salesforce Functions please visit the documentation center.

Getting Started

You can use Functions both locally and deployed to a Salesforce Organization, if you don't have access to a Functions Enabled Org, you can still use the examples in this repository, please refer to the Local Development section for more information.

Prerequisites

Please refer to the Install Prerequisites for detailed information about the necessary tools to start developing Salesforce Functions.

Salesforce Org Setup and Deployment

For more information about how to configure your organization for Salesforce Functions, please refer to the documentation

Prerequisite: Functions Enabled Org

  1. If you haven't already done so, authorize with your org and provide it with an alias (fnrecipesorg in the command below):
sfdx auth:web:login -d -a fnrecipesorg
  1. Clone the functions-recipes repository:
git clone https://github.com/trailheadapps/functions-recipes
cd functions-recipes
  1. Create a scratch org and provide it with an alias (functions_recipes in the command below):
sfdx force:org:create -s -f config/project-scratch-def.json -a functions_recipes
  1. Push source app to the scratch org:
sfdx force:source:push -f
  1. Assign the FunctionsRecipes permission set to the default user:
sfdx force:user:permset:assign -n FunctionsRecipes

Salesforce Functions Deployment

For more information about how to deploy Functions to a Compute Environment and connect it to an org, please refer to to the documentation

  1. Login to your Salesforce Functions account:
sfdx login:functions
  1. Create a Compute Environment to deploy the functions and connected it to your org:
sfdx env:create:compute --connected-org=functions_recipes --setalias=fn_recipes
  1. Deploy the functions
sfdx project:deploy:functions --connected-org=functions_recipes

Functions Recipes App

After deploying both the Salesforce app and the functions, you can open the Salesforce org and navigate to the Functions Recipes application:

From there you'll be able to explore the source code and invoke the deployed functions.

Screenshot

Local Development

Each individual function can be started and invoked locally using the Salesforce CLI, you can refer to each individual README for instructions on how to start and invoke each function locally.

  1. Introduction to Functions
  2. InvocationEvent
  3. Context
  4. Logging
  5. Environment Variables

functions-recipes's People

Contributors

julianduque avatar pozil avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.