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> );}
// 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> );}
1 Reply
andersgee
andersgee2y ago
julia as in the julia language? and installing as in letting a user install julia or what?
Want results from more Discord servers?
Add your server