Skip to content

Commit

Permalink
Use NODE_ENV for stage check
Browse files Browse the repository at this point in the history
  • Loading branch information
patnorris authored and patnorris committed Feb 22, 2023
1 parent 7a3856d commit d19528e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ dfx deploy --argument "(

--> access frontend at http://localhost:4943/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai
access routes like so http://localhost:4943/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai#/testroom
needs to be redeployed after every change
or http://localhost:4943/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai#/space/0 (for space with spaceid 0)

needs to be redeployed after every change to reflect changes

# Alternative 3. Run a local vite UI (note that this had issues communicating to the backend canister for some setups in the past)
npm run vite
Expand Down
10 changes: 5 additions & 5 deletions src/PersonalWebSpace_frontend/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {

//__________Local vs Mainnet Development____________
/* export const HOST =
process.env.DFX_NETWORK !== "ic"
? "http://localhost:4943" // to be used with http://localhost:4943/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai#/testroom
: "https://ic0.app"; // Use in Production (on Mainnet) */
backendCanisterId === "vee64-zyaaa-aaaai-acpta-cai"
? "https://ic0.app" // Use in Production (on Mainnet)
: "http://localhost:4943"; // to be used with http://localhost:4943/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai#/testroom */

export const HOST =
backendCanisterId === "vee64-zyaaa-aaaai-acpta-cai"
process.env.NODE_ENV !== "development"
? "https://ic0.app"
: "http://localhost:4943"; // to be used with http://localhost:4943/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai#/testroom
: "http://localhost:4943";

type State = {
isAuthed: "plug" | "stoic" | null;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
"sourceMap": true,
// "skipLibCheck": true,
//"resolveJsonModule": true,
"esModuleInterop": true,
"noEmit": true,
"allowSyntheticDefaultImports": true,
Expand Down

0 comments on commit d19528e

Please sign in to comment.