I just wonder how to get appwrite site env to angular env like next ?
TypeScript
appwriteEndpoint: string;
appwriteProjectId: string;
appwriteProjectName: string;
} = {
appwriteEndpoint: 'APPWRITE_ENDPOINT',
appwriteProjectId: 'APPWRITE_PROJECT_ID',
appwriteProjectName: 'APPWRITE_PROJECT_NAME',
};
cause we are not gonna push with value to git.
TL;DR
Developers seek to access Appwrite site environment variables in Angular without revealing sensitive information on GitHub. You can use environment.ts file for this purpose:
```typescript
export const environment = {
appwriteEndpoint: process.env.APPWRITE_ENDPOINT,
appwriteProjectId: process.env.APPWRITE_PROJECT_ID,
appwriteProjectName: process.env.APPWRITE_PROJECT_NAME
};
```
Remember to manage these variables securely on your server and not push them to GitHub.Recommended threads
- Cloud function deployment failures
When I run appwrite push functions, select the function I want to deploy, confirm with a YES, is starts deploying but goes into error. I need to repeat the ste...
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Failed to create function
Hey everyone 👋 I'm having an issue creating Functions on Appwrite Cloud and I'm not sure if it's a platform bug or something wrong in my project. When I try t...