Back

[SOLVED]netlify+appwrite

  • 0
  • Web
wings of ice
7 Mar, 2024, 18:14

tried to upload my site on netlify with appwrite but the authentification didn't work anyone know what can be wrong in the porject ?

TL;DR
Problem was with configuring environment variables in Netlify for an app combining Netlify and Appwrite. The solution was to set up the environment variables correctly in Netlify based on the code provided.
Steven
7 Mar, 2024, 18:27

what's the error?

wings of ice
7 Mar, 2024, 18:28
Steven
7 Mar, 2024, 18:30

something is wrong with what you're passing into client.setEndpoint(). Did you configure the environment variable in netlify (assuming you're using an environment variable)?

wings of ice
7 Mar, 2024, 18:31

this is what you mean right ?

wings of ice
7 Mar, 2024, 18:31

or is there something else ?

Steven
7 Mar, 2024, 18:32

no this is Appwrite side.

Steven
7 Mar, 2024, 18:33

your code:

TypeScript
export const conf = {
  appwriteUrl: String(process.env.REACT_APP_APPWRITE_URL),
  appwriteProjectId: String(process.env.REACT_APP_APPWRITE_PROJECT_ID),
  appwriteDatabaseId: String(process.env.REACT_APP_APPWRITE_DATABASE_ID),
  appwriteCollectionId: String(
    process.env.REACT_APP_APPWRITE_TODO_COLLECTION_ID
  ),
  appwriteApiKey: String(process.env.REACT_APP_APPWRITE_API_KEY),
  appwriteTODOCOLLECTION: String(
    process.env.REACT_APP_APPWRITE_TODO_COLLECTION_ID
  ),
  appwriteGOALSCOLLECTION: String(
    process.env.REACT_APP_APPWRITE_GOALS_COLLECTION_ID
  ),
  appwriteAllTags: String(process.env.REACT_APP_APPWRITE_ALLTAGS_COLLECTION_ID),
  appwriteSUBTASKS: String(
    process.env.REACT_APP_APPWRITE_SUBTASKS_COLLECTION_ID
  ),
  appwriteGoalslvlpicture: String(
    process.env.REACT_APP_APPWRITE_GOALS_LVL_PICTURE_COLLECTION_ID
  ),
  appwriteROUTINECOLLECTION: String(
    process.env.REACT_APP_APPWRITE_ROUTINE_COLLECTION_ID
  ),
};
Steven
7 Mar, 2024, 18:33

you're using all these environment variables. so you need to configure them in Netlify

wings of ice
7 Mar, 2024, 18:33

ohhh

wings of ice
7 Mar, 2024, 18:33

one sec then

wings of ice
7 Mar, 2024, 18:52

okay that was stupid of me . thank you !

wings of ice
7 Mar, 2024, 18:52

[SOLVED]netlify+appwrite

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more