© 2026 Hedgehog Software, LLC
Cannot call server function outside of a request
"use server"; import supertokens from "supertokens-node"; import Session from "supertokens-node/recipe/session"; import EmailPassword from "supertokens-node/recipe/emailpassword"; export const initAuthServer = () => { supertokens.init({ framework: "express", supertokens: { connectionURI: "https://st-dev-5b734821-6414-11ef-8c62-03ca6dc7cc97.aws.supertokens.io", apiKey: "a9ntJvmIYaQ-iWRUsLnGRDsWV-", }, appInfo: { appName: "ficlib", apiDomain: "http://localhost:8000", websiteDomain: "http://localhost:3000", apiBasePath: "/auth", websiteBasePath: "/auth", }, recipeList: [EmailPassword.init(), Session.init()], }); };
import { createHandler, StartServer } from "@solidjs/start/server"; import { initAuthServer } from "./app/auth/server"; initAuthServer(); // usage export default createHandler(() => ( <StartServer document={({ assets, children, scripts }) => ( <html lang="en" class="dark"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> {assets} </head> <body> <div id="app">{children}</div> {scripts} </body> </html> )} /> ));