1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-30 06:30:11 +02:00

renamed env variable

This commit is contained in:
Elias Schneider 2022-04-25 17:16:17 +02:00
parent 1343bedfef
commit d6718cc545
No known key found for this signature in database
GPG Key ID: D5EC1C72D93244FD
6 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
APPWRITE_FUNCTION_API_KEY=
# IMPORTANT If you're running the website inside docker and your Appwrite instance runs on localhost host,
# use host.docker.internal instead of localhost
APPWRITE_HOST=http://host.docker.internal/v1
NEXT_PUBLIC_APPWRITE_HOST=http://host.docker.internal/v1
# Must be the same as in the _APP_STORAGE_LIMIT in the Appwrite env file
NEXT_PUBLIC_MAX_FILE_SIZE=300000000

View File

@ -2,7 +2,7 @@ import axios from "axios";
const api = () =>
axios.create({
baseURL: process.env["APPWRITE_HOST"],
baseURL: process.env["NEXT_PUBLIC_APPWRITE_HOST"],
headers: {
cookie: `a_session_console=${process.env["APPWRITE_USER_TOKEN"]}`,
},

View File

@ -3,7 +3,7 @@ const aw = () => {
let client = new sdk.Client();
client
.setEndpoint(process.env["APPWRITE_HOST"])
.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"])
.setProject("pingvin-share")
.setKey(process.env["APPWRITE_API_KEY"])
.setSelfSigned();

View File

@ -36,7 +36,7 @@ To set up the frontend of Pingvin Share follow these steps.
1. Go to your Appwrite console, visit "API Keys" and copy the "Functions API Key" secret to your clipboard.
2. Rename the `.env.example` file to `.env`
3. Paste the key in the `.env` file
4. Change `APPWRITE_HOST` in the `.env` file to the host where your Appwrite instance runs
4. Change `NEXT_PUBLIC_APPWRITE_HOST` in the `.env` file to the host where your Appwrite instance runs
5. Change `NEXT_PUBLIC_MAX_FILE_SIZE` in the `.env` file to the max file size limit you want
Start the frontend:

View File

@ -3,7 +3,7 @@ import { Appwrite } from "appwrite";
// SDK for client side (browser)
const aw = new Appwrite();
aw.setEndpoint(process.env["APPWRITE_HOST"] as string)
aw.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"] as string)
.setProject("pingvin-share");
export default aw;

View File

@ -4,7 +4,7 @@ import sdk from "node-appwrite";
const client = new sdk.Client();
client
.setEndpoint(process.env["APPWRITE_HOST"] as string)
.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"] as string)
.setProject("pingvin-share")
.setKey(process.env["APPWRITE_FUNCTION_API_KEY"] as string);