mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-02-19 01:55:48 -05:00
renamed env variable
This commit is contained in:
parent
1343bedfef
commit
d6718cc545
6 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
APPWRITE_FUNCTION_API_KEY=
|
APPWRITE_FUNCTION_API_KEY=
|
||||||
# IMPORTANT If you're running the website inside docker and your Appwrite instance runs on localhost host,
|
# IMPORTANT If you're running the website inside docker and your Appwrite instance runs on localhost host,
|
||||||
# use host.docker.internal instead of localhost
|
# 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
|
# Must be the same as in the _APP_STORAGE_LIMIT in the Appwrite env file
|
||||||
NEXT_PUBLIC_MAX_FILE_SIZE=300000000
|
NEXT_PUBLIC_MAX_FILE_SIZE=300000000
|
|
@ -2,7 +2,7 @@ import axios from "axios";
|
||||||
|
|
||||||
const api = () =>
|
const api = () =>
|
||||||
axios.create({
|
axios.create({
|
||||||
baseURL: process.env["APPWRITE_HOST"],
|
baseURL: process.env["NEXT_PUBLIC_APPWRITE_HOST"],
|
||||||
headers: {
|
headers: {
|
||||||
cookie: `a_session_console=${process.env["APPWRITE_USER_TOKEN"]}`,
|
cookie: `a_session_console=${process.env["APPWRITE_USER_TOKEN"]}`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@ const aw = () => {
|
||||||
let client = new sdk.Client();
|
let client = new sdk.Client();
|
||||||
|
|
||||||
client
|
client
|
||||||
.setEndpoint(process.env["APPWRITE_HOST"])
|
.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"])
|
||||||
.setProject("pingvin-share")
|
.setProject("pingvin-share")
|
||||||
.setKey(process.env["APPWRITE_API_KEY"])
|
.setKey(process.env["APPWRITE_API_KEY"])
|
||||||
.setSelfSigned();
|
.setSelfSigned();
|
||||||
|
|
|
@ -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.
|
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`
|
2. Rename the `.env.example` file to `.env`
|
||||||
3. Paste the key in the `.env` file
|
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
|
5. Change `NEXT_PUBLIC_MAX_FILE_SIZE` in the `.env` file to the max file size limit you want
|
||||||
|
|
||||||
Start the frontend:
|
Start the frontend:
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Appwrite } from "appwrite";
|
||||||
// SDK for client side (browser)
|
// SDK for client side (browser)
|
||||||
const aw = new Appwrite();
|
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");
|
.setProject("pingvin-share");
|
||||||
|
|
||||||
export default aw;
|
export default aw;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import sdk from "node-appwrite";
|
||||||
const client = new sdk.Client();
|
const client = new sdk.Client();
|
||||||
|
|
||||||
client
|
client
|
||||||
.setEndpoint(process.env["APPWRITE_HOST"] as string)
|
.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"] as string)
|
||||||
.setProject("pingvin-share")
|
.setProject("pingvin-share")
|
||||||
.setKey(process.env["APPWRITE_FUNCTION_API_KEY"] as string);
|
.setKey(process.env["APPWRITE_FUNCTION_API_KEY"] as string);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue