Writing Functions
Build the Cloud Functions by writing JavaScript code.
There is a list of things you need to know about writing Cloud Functions using our boilerplate.
You can write your function in JavaScript.
Functions implementation lives inside of /functions directory, e.g., /functions/hellowWorld.
Every function is an independent Node.js module with its own dependencies.
The entry point of every function is always the main.js file, e.g., /functions/helloWorld/main.js.
Every function needs a configuration file with metadata about the function.
You can also build your functions by writing "TypeScript" as long as you push a build code that contains the main.js file at the root of each function.
What do you need to know about writing functions?
Function Anatomy: understand the function folder structure.
Configuration file: implement the configuration of your function.
Function Triggers: define the trigger of your function.
Environment Variables: define the environment variables of your function.
Documentation: explain how your function works.
You can check the https://github.com/nexxtway/functions.store-learning workspace example on GitHub to see how functions are created.
Last updated