mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-09 04:22:13 +00:00
feat: update region placeholder
This commit is contained in:
@@ -88,7 +88,7 @@ We then entered the application directory, installed the Appwrite Web SDK and Pi
|
||||
```js
|
||||
// ./src/lib/constants.js
|
||||
|
||||
export const APPWRITE_ENDPOINT = 'https://cloud.appwrite.io/v1';
|
||||
export const APPWRITE_ENDPOINT = 'https://<REGION>.cloud.appwrite.io/v1';
|
||||
|
||||
export const APPWRITE_PROJECT = '<PROJECT_ID>';
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ All of the Appwrite client SDKs for Web, Flutter, iOS, or Android come with buil
|
||||
import { Client } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('<https://cloud.appwrite.io/v1>')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
client.subscribe('account', response => {
|
||||
|
||||
@@ -12,7 +12,7 @@ Redirected requests will show a `301` response status.
|
||||
```http
|
||||
HTTP/1.1 301 Moved Permanently
|
||||
Content-Type: application/json
|
||||
Location: https://cloud.appwrite.io/v1/<ENDPOINT>
|
||||
Location: https://<REGION>.cloud.appwrite.io/v1/<ENDPOINT>
|
||||
```
|
||||
|
||||
Appwrite Cloud does not support HTTP, which is a common practice in modern development, because unencrypted
|
||||
|
||||
@@ -209,7 +209,7 @@ Next add code to validate the body of the request and initialize the Appwrite SD
|
||||
|
||||
```js
|
||||
const client = new Client()
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://cloud.appwrite.io/v1")
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ export default class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -216,7 +216,7 @@ import Speech from 'lmnt-node';
|
||||
Next, add code to validate the body of the request and initialize the Appwrite SDK also within `main.js` following the previously added GET handler:
|
||||
|
||||
```js
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT ?? "https://cloud.appwrite.io/v1";
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT ?? "https://<REGION>.cloud.appwrite.io/v1";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint(endpoint)
|
||||
|
||||
@@ -205,7 +205,7 @@ Add code to validate the body of the request and initialize the Appwrite SDK:
|
||||
|
||||
```js
|
||||
const client = new Client()
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://cloud.appwrite.io/v1")
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ export default class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -285,7 +285,7 @@ let resJson = await response.json();
|
||||
|
||||
// Upload image to Appwrite Storage and return URL
|
||||
if (req.body.type === 'image') {
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT || 'https://cloud.appwrite.io/v1'
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT || 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint(endpoint)
|
||||
|
||||
@@ -119,7 +119,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -58,7 +58,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -102,7 +102,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -57,7 +57,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -58,7 +58,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -571,7 +571,7 @@ You can find a version of this example in the [Appwrite Android tutorial](/docs/
|
||||
//... imports
|
||||
|
||||
object Appwrite {
|
||||
private const val ENDPOINT = "https://cloud.appwrite.io/v1"
|
||||
private const val ENDPOINT = "https://<REGION>.cloud.appwrite.io/v1"
|
||||
private const val PROJECT_ID = "<PROJECT_ID>"
|
||||
|
||||
private lateinit var client: Client
|
||||
|
||||
@@ -659,7 +659,7 @@ mutation {
|
||||
|
||||
|
||||
```http
|
||||
POST https://cloud.appwrite.io/v1/functions/<FUNCTION_ID>/executions HTTP/1.1
|
||||
POST https://<REGION>.cloud.appwrite.io/v1/functions/<FUNCTION_ID>/executions HTTP/1.1
|
||||
X-Appwrite-Project: "<PROJECT_ID>"
|
||||
X-Appwrite-Response-Format: 1.5.0
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -187,7 +187,7 @@ appwrite help
|
||||
At any point, if you would like to change your server's endpoint, project ID, or self-signed certificate acceptance, use the `client` command.
|
||||
|
||||
```sh
|
||||
appwrite client --endpoint https://cloud.appwrite.io/v1
|
||||
appwrite client --endpoint https://<REGION>.cloud.appwrite.io/v1
|
||||
appwrite client --key 23f24gwrhSDgefaY
|
||||
appwrite client --self-signed true
|
||||
appwrite client --reset // Resets your CLI configuration
|
||||
|
||||
@@ -7,7 +7,7 @@ The Appwrite CLI can be used in a non-interactive and headless manner, without s
|
||||
|
||||
```sh
|
||||
appwrite client \
|
||||
--endpoint https://cloud.appwrite.io/v1 \
|
||||
--endpoint https://<REGION>.cloud.appwrite.io/v1 \
|
||||
--project-id [PROJECT_ID] \
|
||||
--key YOUR_API_KEY
|
||||
```
|
||||
|
||||
@@ -51,7 +51,7 @@ import android.content.Context
|
||||
import io.appwrite.Client
|
||||
|
||||
object Appwrite {
|
||||
private const val ENDPOINT = "https://cloud.appwrite.io/v1"
|
||||
private const val ENDPOINT = "https://<REGION>.cloud.appwrite.io/v1"
|
||||
private const val PROJECT_ID = "<PROJECT_ID>"
|
||||
|
||||
private lateinit var client: Client
|
||||
|
||||
@@ -62,7 +62,7 @@ Look for `// Add this line 👇` to find where the changes made here.
|
||||
|
||||
```kotlin
|
||||
object Appwrite {
|
||||
private const val ENDPOINT = "https://cloud.appwrite.io/v1"
|
||||
private const val ENDPOINT = "https://<REGION>.cloud.appwrite.io/v1"
|
||||
private const val PROJECT_ID = "<PROJECT_ID>"
|
||||
|
||||
private lateinit var client: Client
|
||||
|
||||
@@ -103,7 +103,7 @@ import android.content.Context
|
||||
import io.appwrite.Client
|
||||
|
||||
object Appwrite {
|
||||
private const val ENDPOINT = "https://cloud.appwrite.io/v1"
|
||||
private const val ENDPOINT = "https://<REGION>.cloud.appwrite.io/v1"
|
||||
private const val PROJECT_ID = "<PROJECT_ID>"
|
||||
|
||||
private lateinit var client: Client
|
||||
|
||||
@@ -83,7 +83,7 @@ For example, your `.env` might look something similar to this.
|
||||
|
||||
```env
|
||||
APPWRITE_KEY=<YOUR_API_KEY>
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||
```
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ For example, your `.env` might look something similar to this.
|
||||
|
||||
```env
|
||||
NEXT_APPWRITE_KEY=<YOUR_API_KEY>
|
||||
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||
NEXT_PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||
```
|
||||
|
||||
|
||||
@@ -103,6 +103,6 @@ For example, your `.env` might look something similar to this.
|
||||
|
||||
```env
|
||||
APPWRITE_KEY=<YOUR_API_KEY>
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ Your project id is located in the **Settings** page in the Appwrite console.
|
||||
Add a `.env` file to the root directory and add the following code to it, replacing `PROJECT_ID` with your project id.
|
||||
|
||||
```
|
||||
VITE_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
VITE_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||
VITE_APPWRITE_PROJECT=PROJECT_ID
|
||||
```
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export const appwrite = {
|
||||
For example, your `.env` might look something similar to this.
|
||||
|
||||
```env
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_PROJECT=642sdddf85b440dc7e5bf
|
||||
```
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ For example, your `.env` might look something similar to this.
|
||||
|
||||
```text
|
||||
APPWRITE_KEY=<YOUR_API_KEY>
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user