Managing Functions
Launching the First Function
To create a function:
- Log in to the Control panel.
- Go to the Cloud platform section.
- Create a project and go to the Functions section.
- Click Create function.
- Specify a unique function name and choose runtime.
- Add code. Use code editor if you have single file without external requirements. Use archive if you have several files or external requirements. For an archive specify the path to the file with the code in the archive.
- The maximum size for the entire archive is 10MB. For Python archive should contain the requirements.txt file (a list of libraries not included in the Python standard library) and setup.py (installation file). For Node.js: package.json (file with module description and a list of dependencies).
- Click Save and deploy.
- To get a URL link for calling a function, go to “Triggers” and turn on HTTP-request.
Editing Functions
To edit a function:
- Open a project with a function and go to the Functions section.
- Select the function from the list.
- Make changes.
- Click Save and deploy.
Deleting Functions
To delete a function:
- Open a project with a function and go to the Functions section.
- Select the desired function from the list.
- Click on the trash icon (Delete function).