Home / Companies / SuperTokens / Blog / Post Details
Content Deep Dive

How to deploy SuperTokens with React and NodeJS on Vercel

Blog post from SuperTokens

Post Details
Company
Date Published
Author
Rishabh Poddar
Word Count
716
Language
English
Hacker News Points
-
Summary

This tutorial provides a step-by-step guide for integrating SuperTokens authentication into a React and NodeJS application, followed by deployment on Vercel. It begins by directing users to choose a login method from the SuperTokens Recipe Guides and outlines the process for restructuring the application to fit Vercel's deployment model, including creating an API folder for the backend logic. The guide emphasizes configuring appInfo settings to dynamically adjust for Vercel's changing URLs, using environment variables on the backend and window.location.origin on the frontend. It also advises updating CORS middleware to accommodate Vercel's URL. The tutorial concludes with instructions for creating a vercel.json file to ensure proper routing of traffic to the backend server and executing the deployment with the vercel command. Additionally, a demo app is available on GitHub, showcasing the integration with Email Password login and express, configured for Vercel deployment.