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
|
```js
|
||||||
// ./src/lib/constants.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>';
|
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";
|
import { Client } from "appwrite";
|
||||||
|
|
||||||
const client = new Client()
|
const client = new Client()
|
||||||
.setEndpoint('<https://cloud.appwrite.io/v1>')
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||||
.setProject('<PROJECT_ID>');
|
.setProject('<PROJECT_ID>');
|
||||||
|
|
||||||
client.subscribe('account', response => {
|
client.subscribe('account', response => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Redirected requests will show a `301` response status.
|
|||||||
```http
|
```http
|
||||||
HTTP/1.1 301 Moved Permanently
|
HTTP/1.1 301 Moved Permanently
|
||||||
Content-Type: application/json
|
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
|
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
|
```js
|
||||||
const client = new Client()
|
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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ export default class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.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:
|
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
|
```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()
|
const client = new Client()
|
||||||
.setEndpoint(endpoint)
|
.setEndpoint(endpoint)
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ Add code to validate the body of the request and initialize the Appwrite SDK:
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const client = new Client()
|
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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ export default class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ let resJson = await response.json();
|
|||||||
|
|
||||||
// Upload image to Appwrite Storage and return URL
|
// Upload image to Appwrite Storage and return URL
|
||||||
if (req.body.type === 'image') {
|
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()
|
const client = new Client()
|
||||||
.setEndpoint(endpoint)
|
.setEndpoint(endpoint)
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.setKey(process.env.APPWRITE_API_KEY);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class AppwriteService {
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.setEndpoint(
|
.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)
|
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||||
.setKey(process.env.APPWRITE_API_KEY);
|
.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
|
//... imports
|
||||||
|
|
||||||
object Appwrite {
|
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 const val PROJECT_ID = "<PROJECT_ID>"
|
||||||
|
|
||||||
private lateinit var client: Client
|
private lateinit var client: Client
|
||||||
|
|||||||
@@ -659,7 +659,7 @@ mutation {
|
|||||||
|
|
||||||
|
|
||||||
```http
|
```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-Project: "<PROJECT_ID>"
|
||||||
X-Appwrite-Response-Format: 1.5.0
|
X-Appwrite-Response-Format: 1.5.0
|
||||||
Content-Type: application/json
|
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.
|
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
|
```sh
|
||||||
appwrite client --endpoint https://cloud.appwrite.io/v1
|
appwrite client --endpoint https://<REGION>.cloud.appwrite.io/v1
|
||||||
appwrite client --key 23f24gwrhSDgefaY
|
appwrite client --key 23f24gwrhSDgefaY
|
||||||
appwrite client --self-signed true
|
appwrite client --self-signed true
|
||||||
appwrite client --reset // Resets your CLI configuration
|
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
|
```sh
|
||||||
appwrite client \
|
appwrite client \
|
||||||
--endpoint https://cloud.appwrite.io/v1 \
|
--endpoint https://<REGION>.cloud.appwrite.io/v1 \
|
||||||
--project-id [PROJECT_ID] \
|
--project-id [PROJECT_ID] \
|
||||||
--key YOUR_API_KEY
|
--key YOUR_API_KEY
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ import android.content.Context
|
|||||||
import io.appwrite.Client
|
import io.appwrite.Client
|
||||||
|
|
||||||
object Appwrite {
|
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 const val PROJECT_ID = "<PROJECT_ID>"
|
||||||
|
|
||||||
private lateinit var client: Client
|
private lateinit var client: Client
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Look for `// Add this line 👇` to find where the changes made here.
|
|||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
object Appwrite {
|
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 const val PROJECT_ID = "<PROJECT_ID>"
|
||||||
|
|
||||||
private lateinit var client: Client
|
private lateinit var client: Client
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ import android.content.Context
|
|||||||
import io.appwrite.Client
|
import io.appwrite.Client
|
||||||
|
|
||||||
object Appwrite {
|
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 const val PROJECT_ID = "<PROJECT_ID>"
|
||||||
|
|
||||||
private lateinit var client: Client
|
private lateinit var client: Client
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ For example, your `.env` might look something similar to this.
|
|||||||
|
|
||||||
```env
|
```env
|
||||||
APPWRITE_KEY=<YOUR_API_KEY>
|
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>
|
PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ For example, your `.env` might look something similar to this.
|
|||||||
|
|
||||||
```env
|
```env
|
||||||
NEXT_APPWRITE_KEY=<YOUR_API_KEY>
|
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>
|
NEXT_PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,6 @@ For example, your `.env` might look something similar to this.
|
|||||||
|
|
||||||
```env
|
```env
|
||||||
APPWRITE_KEY=<YOUR_API_KEY>
|
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>
|
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.
|
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
|
VITE_APPWRITE_PROJECT=PROJECT_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export const appwrite = {
|
|||||||
For example, your `.env` might look something similar to this.
|
For example, your `.env` might look something similar to this.
|
||||||
|
|
||||||
```env
|
```env
|
||||||
PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
PUBLIC_APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1
|
||||||
PUBLIC_APPWRITE_PROJECT=642sdddf85b440dc7e5bf
|
PUBLIC_APPWRITE_PROJECT=642sdddf85b440dc7e5bf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ For example, your `.env` might look something similar to this.
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
APPWRITE_KEY=<YOUR_API_KEY>
|
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>
|
PUBLIC_APPWRITE_PROJECT=<PROJECT_ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user