TL;DR


I created a login for Surreal Database and SvelteKit. The core server function can be reused in ANY TS SSR Framework!




Setup


Create a new SvelteKit project with TS.



npx sv create surreal-auth






Install latest version of Surreal JS. I am not using alpha for this demo.



npm i -D surrealdb









Surreal JS...