Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
2 replies
Dale

Vercel and installing Julia

Is there a way to install Julia in a NextJS app deployed onto Vercel? Currently, this is my approach.

// src/pages/index.jsimport { useState } from "react";export default function Install() {  const [message, setMessage] = useState("");  async function installJulia() {    try {      const response = await fetch("/api/installJulia", {        method: "POST",        headers: {          "Content-Type": "application/json",        },      });      const data = await response.json();      console.log(data);      setMessage(JSON.stringify(data));    } catch (error) {      console.error("Error:", error);      setMessage("An error occurred while installing Julia.");    }  }  return (    <main className="flex min-h-screen flex-col items-center justify-between p-24">      <button onClick={installJulia}>Install Julia</button>      {message && <p className="mt-4 text-center text-red-600">{message}</p>}    </main>  );}
Was this page helpful?