Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions app/views/docs/functions.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,6 @@ static RuntimeResponse &main(const RuntimeRequest &req, RuntimeResponse &res) {
</tbody>
</table>

<div class="notice">
<h3>Accessing your Local Appwrite Setup</h3>
<p>If you're running Appwrite locally and trying to connect to your local Appwrite instance from a cloud function, you'll have to use your local IP address in place of localhost. This is because, within the container localhost does not refer to the host machine rather the container itself. </p>
</div>

<h2><a href="/docs/functions#createFunction" id="createFunction">Create your Function</a></h2>

<p>Before you can deploy your function, you will need to create a new function from your Appwrite project's dashboard. Access the Function settings from your project's left navigation panel. Click the 'Add Function' button and choose a function name and runtime. In your Functions settings page, you can also set your function event triggers, CRON schedule, and set secure environment variables for your function. </p>
Expand Down Expand Up @@ -827,7 +822,8 @@ class MainActivity : AppCompatActivity() {

<div class="notice">
<h3>Using an Appwrite SDK in Your Function</h3>
<p>Appwrite Server SDKs require an API key, an endpoint, and a project ID for authentication. Appwrite passes in your project ID with the environment variable 'APPWRITE_FUNCTION_PROJECT_ID', but not the endpoint and API key. If you need to use a Server SDK, you will need to add environment variables for your endpoint and API key in the 'Settings' tab of your function.</p>
<p>Appwrite Server SDKs require an API key, an endpoint, and a project ID for authentication. Appwrite passes in your project ID with the environment variable <span class="tag">APPWRITE_FUNCTION_PROJECT_ID</span>, but not the endpoint and API key. If you need to use a Server SDK, you will need to add environment variables for your endpoint and API key in the 'Settings' tab of your function.</p>
<p>If you are running a <b>local Appwrite instance</b>, you will need to pass in the machine's public IP instead of <span class="tag">'https://localhost/v1'</span>. Localhost inside the function's runtime container is not the same as localhost of your machine.</p>
</div>

<h2><a href="/docs/functions#appwriteSDKInFunctions" id="appwriteSDKInFunctions">Appwrite SDKs in Functions</a></h2>
Expand Down