Skip to content

Commit

Permalink
added: env var for configuring compiler url
Browse files Browse the repository at this point in the history
  • Loading branch information
Salmandabbakuti committed Jun 20, 2023
1 parent f3b8e88 commit f541a9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_COMPILER_URL=
4 changes: 3 additions & 1 deletion app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ const chains = {
}
};

const compilerUrl = process.env.NEXT_PUBLIC_COMPILER_URL || "api/compile";

export default function Home() {
const [wizardOptions, setWizardOptions] = useState({
premintQuantity: 1000,
Expand Down Expand Up @@ -229,7 +231,7 @@ export default function Home() {
supertokenBaseImport,
supertokenBaseImportLocalPath
);
const response = await fetch("/api/compile", {
const response = await fetch(compilerUrl, {
method: "POST",
headers: {
"Content-Type": "application/json"
Expand Down

0 comments on commit f541a9f

Please sign in to comment.