{
    "componentChunkName": "component---src-pages-blog-markdown-remark-fields-slug-js",
    "path": "/blog/how-to-deploy-supertokens-with-react-nodejs-express-on-vercel",
    "result": {"data":{"markdownRemark":{"html":"<p>In this tutorial, you’ll learn how to add SuperTokens authentication to your React and NodeJS application and deploy it on Vercel.</p>\n<h2 id=\"getting-started\" style=\"position:relative;\"><a href=\"#getting-started\" aria-label=\"getting started permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Getting started</h2>\n<p>To get started with SuperTokens, please visit the <a href=\"https://supertokens.com/docs/guides\" target=\"_blank\" rel=\"nofollow\">Recipe Guides page</a> and pick the login method you want for your application. After choosing a guide, follow the quick setup section or one of the sections for integrating with a framework that you have chosen.</p>\n<p>We also have a blog post for how to integrate <a href=\"https://supertokens.com/blog/how-to-set-up-social-and-email-password-login-with-reactjs\" target=\"_blank\" rel=\"nofollow\">email password + social login with express and react</a>, if that is what you are looking for.</p>\n<h2 id=\"restructuring-your-application-for-vercel-deployment\" style=\"position:relative;\"><a href=\"#restructuring-your-application-for-vercel-deployment\" aria-label=\"restructuring your application for vercel deployment permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Restructuring your application for Vercel deployment</h2>\n<p>Once you have done the basic implementation on your local system, we want to do the following to convert your application so that it can be deployed on Vercel:</p>\n<ol>\n<li>\n<p>Create an <code class=\"language-text\">api</code> folder. This folder will contain the API logic that we can deploy on Vercel. We will be exposing the API’s entry point via an <code class=\"language-text\">index.js</code> file in this folder.</p>\n</li>\n<li>\n<p>Open the <code class=\"language-text\">index.js</code> and export <code class=\"language-text\">app</code> at the end of the file as shown below</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"4451095511422287400\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`module.exports = app;\n`, `4451095511422287400`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">module<span class=\"token punctuation\">.</span>exports <span class=\"token operator\">=</span> app<span class=\"token punctuation\">;</span>\n</code></pre></div>\n</li>\n</ol>\n<blockquote>\n<p>Note: We are deploying our backend as a standalone express app, and not with <code class=\"language-text\">/pages/api</code> serverless functions that Vercel provides. If you want to deploy using <code class=\"language-text\">/pages/api</code>, then you can check out our nextJS framework integration guide that’s within the recipe guide.</p>\n</blockquote>\n<h2 id=\"change-the-appinfo-config-to-get-vercel-deployments-to-work\" style=\"position:relative;\"><a href=\"#change-the-appinfo-config-to-get-vercel-deployments-to-work\" aria-label=\"change the appinfo config to get vercel deployments to work permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Change the appInfo config to get Vercel deployments to work</h2>\n<p>To enable your project to run on production and the inspect sites for Vercel, you need to make the <code class=\"language-text\">websiteDomain</code> and <code class=\"language-text\">appDomain</code> point to the URLs generated by Vercel. The production URL is always the same for an app, but the inspect URL keeps changing. To allow it to work in this dynamic condition, we must set the values of <code class=\"language-text\">apiDomain</code> and <code class=\"language-text\">websiteDomain</code> dynamically.</p>\n<h3 id=\"on-the-backend\" style=\"position:relative;\"><a href=\"#on-the-backend\" aria-label=\"on the backend permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>On the backend</h3>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"34972752221992477000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`appInfo = {\n    appName: &quot;My App&quot;,\n    apiDomain: process.env.VERCEL_URL,\n    websiteDomain: process.env.VERCEL_URL,\n    apiBasePath: &quot;/api/auth&quot;,\n    websiteBasePath: &quot;/auth&quot;,\n},`, `34972752221992477000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">appInfo <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">appName</span><span class=\"token operator\">:</span> <span class=\"token string\">\"My App\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">apiDomain</span><span class=\"token operator\">:</span> process<span class=\"token punctuation\">.</span>env<span class=\"token punctuation\">.</span><span class=\"token constant\">VERCEL_URL</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">websiteDomain</span><span class=\"token operator\">:</span> process<span class=\"token punctuation\">.</span>env<span class=\"token punctuation\">.</span><span class=\"token constant\">VERCEL_URL</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">apiBasePath</span><span class=\"token operator\">:</span> <span class=\"token string\">\"/api/auth\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">websiteBasePath</span><span class=\"token operator\">:</span> <span class=\"token string\">\"/auth\"</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span></code></pre></div>\n<p>Vercel provides an env var - <code class=\"language-text\">process.env.VERCEL_URL</code> - to the backend which is equal to the inspect URL / production URL (depending on the site that’s loaded). So we use this to set the <code class=\"language-text\">apiDomain</code> and <code class=\"language-text\">websiteDomain</code> values dynamically.</p>\n<h3 id=\"on-the-frontend\" style=\"position:relative;\"><a href=\"#on-the-frontend\" aria-label=\"on the frontend permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>On the frontend</h3>\n<p>We can use <code class=\"language-text\">window.location.origin</code> to get the currently loaded URL and set those to the <code class=\"language-text\">apiDomain</code> and <code class=\"language-text\">websiteDomain</code>. This way, even if the inspect URL keeps on changing, it will still point to the current domain.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"83626300327855780000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`appInfo = {\n    appName: &quot;TodoApp&quot;,\n    apiDomain: window.location.origin,\n    websiteDomain: window.location.origin,\n    apiBasePath: &quot;/api/auth&quot;,\n    websiteBasePath: &quot;/auth&quot;,      \n},\n`, `83626300327855780000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">appInfo <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">appName</span><span class=\"token operator\">:</span> <span class=\"token string\">\"TodoApp\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">apiDomain</span><span class=\"token operator\">:</span> window<span class=\"token punctuation\">.</span>location<span class=\"token punctuation\">.</span>origin<span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">websiteDomain</span><span class=\"token operator\">:</span> window<span class=\"token punctuation\">.</span>location<span class=\"token punctuation\">.</span>origin<span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">apiBasePath</span><span class=\"token operator\">:</span> <span class=\"token string\">\"/api/auth\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">websiteBasePath</span><span class=\"token operator\">:</span> <span class=\"token string\">\"/auth\"</span><span class=\"token punctuation\">,</span>      \n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n</code></pre></div>\n<blockquote>\n<p>This only works if the frontend and backend of your application have the same domain. If your backend is hosted elsewhere and you use Vercel only for the frontend, be sure to change the <code class=\"language-text\">apiDomain</code> on the frontend and backend to point to your backend server. In this case however, your app may not function properly for inspect deployments since your backend server has no way of knowing what the inspect URL of the frontend site would be on each deployment.</p>\n</blockquote>\n<h2 id=\"update-the-cors-middleware\" style=\"position:relative;\"><a href=\"#update-the-cors-middleware\" aria-label=\"update the cors middleware permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Update the CORS Middleware</h2>\n<p>You also need to update the CORS middleware origin with the <code class=\"language-text\">VERCEL_URL</code> environment variable.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"24517723234251120000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`app.use(\n    cors({\n        origin: process.env.VERCEL_URL,\n        allowedHeaders: ['content-type', ...SuperTokens.getAllCORSHeaders()],credentials: true,\n    })\n);`, `24517723234251120000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">app<span class=\"token punctuation\">.</span><span class=\"token function\">use</span><span class=\"token punctuation\">(</span>\n    <span class=\"token function\">cors</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">origin</span><span class=\"token operator\">:</span> process<span class=\"token punctuation\">.</span>env<span class=\"token punctuation\">.</span><span class=\"token constant\">VERCEL_URL</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">allowedHeaders</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">'content-type'</span><span class=\"token punctuation\">,</span> <span class=\"token operator\">...</span>SuperTokens<span class=\"token punctuation\">.</span><span class=\"token function\">getAllCORSHeaders</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span><span class=\"token literal-property property\">credentials</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h2 id=\"configure-vercel-and-deploy\" style=\"position:relative;\"><a href=\"#configure-vercel-and-deploy\" aria-label=\"configure vercel and deploy permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configure Vercel and Deploy</h2>\n<p>With the backend and frontend of your application code updated, create a <code class=\"language-text\">vercel.json</code> file in the root directory of your application which will instruct Vercel to push all traffic on <code class=\"language-text\">/api/*</code> path to our our express backend server:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"88477135186018140000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`{\n    &quot;rewrites&quot;: [{ &quot;source&quot;: &quot;/api/(.*)&quot;, &quot;destination&quot;: &quot;/api&quot; }]\n}`, `88477135186018140000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token punctuation\">{</span>\n    <span class=\"token string-property property\">\"rewrites\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">{</span> <span class=\"token string-property property\">\"source\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"/api/(.*)\"</span><span class=\"token punctuation\">,</span> <span class=\"token string-property property\">\"destination\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"/api\"</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<p>Finally, to deploy the app to Vercel, you need to run the vercel command on the root of your project:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"31307763438640590000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`vercel`, `31307763438640590000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"language-sh\"><code class=\"language-sh\">vercel</code></pre></div>\n<p>Once deployed, you should be able to test the login functionality on the inspect URL and the production URL.</p>\n<h2 id=\"demo-app\" style=\"position:relative;\"><a href=\"#demo-app\" aria-label=\"demo app permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Demo app</h2>\n<p>We also have <a href=\"https://github.com/supertokens/supertokens-auth-react/tree/master/examples/with-emailpassword-vercel\" target=\"_blank\" rel=\"nofollow\">a demo app on our GitHub</a> that has Email Password login with express and React, and is configured to work with Vercel. You can even see its <a href=\"https://with-emailpassword-vercel-beryl.vercel.app/\" target=\"_blank\" rel=\"nofollow\">live preview</a>.</p>","frontmatter":{"date":"April 14, 2022","title":"How to deploy SuperTokens with React and NodeJS on Vercel","cover":"vercel.png","author":"Rishabh Poddar","description":"This tutorial wil guide you on how to add SuperTokens to a React and Express app deployed on Vercel"},"fields":{"slug":"/how-to-deploy-supertokens-with-react-nodejs-express-on-vercel/"}},"site":{"siteMetadata":{"title":"SuperTokens Blog"}}},"pageContext":{"id":"e2071817-67ef-54d0-a4ff-429db8fbe31f","fields__slug":"/how-to-deploy-supertokens-with-react-nodejs-express-on-vercel/","__params":{"fields__slug":"how-to-deploy-supertokens-with-react-nodejs-express-on-vercel"}}},
    "staticQueryHashes": []}