{"id":7715,"date":"2026-02-04T03:37:41","date_gmt":"2026-02-04T03:37:41","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=7715"},"modified":"2026-03-05T16:26:02","modified_gmt":"2026-03-05T16:26:02","slug":"connecting-a-supabase-database-to-a-hostinger-node-js-application","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/connecting-a-supabase-database-to-a-hostinger-node-js-application\/","title":{"rendered":"Connecting a Supabase Database to a Hostinger Node.js Application"},"content":{"rendered":"<p data-renderer-start-pos=\"70\" data-local-id=\"8f1d4989e6dd\">This guide explains how to connect a <strong data-renderer-mark=\"true\">Supabase project<\/strong> to a <strong data-renderer-mark=\"true\">Node.js application hosted on Hostinger<\/strong> using the <strong data-renderer-mark=\"true\">Supabase JavaScript client<\/strong>.<\/p><p data-renderer-start-pos=\"210\" data-local-id=\"99a69a648096\">Before we start, ensure:<\/p><ul class=\"ak-ul\" data-local-id=\"4eb6091a-218f-46e7-9c65-8ffe18ff0c68\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"238\" data-local-id=\"13e5157262fe\">You already have a <strong data-renderer-mark=\"true\">built Node.js application<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"286\" data-local-id=\"a070cead7e29\">Your database is hosted on <strong data-renderer-mark=\"true\">Supabase (third-party provider)<\/strong><\/p>\n<\/li>\n<\/ul><p data-renderer-start-pos=\"350\" data-local-id=\"fcb951bd848b\">When using a third-party database provider (like Supabase), Hostinger supports Node.js applications to connect to externally hosted databases such as:<\/p><ul class=\"ak-ul\" data-local-id=\"590bfd9f-e609-46d5-b07b-b9f4f7a6f680\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"504\" data-local-id=\"e944b78b564d\">PostgreSQL<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"519\" data-local-id=\"d199f4363a9a\"><span data-highlighted=\"true\" data-vc=\"highlighted-text\"><span class=\"_kqswh2mm\"><span class=\"_5pioz8co _189e1dm9 _1il9buyh _19lc184f _d0altlke\" data-testid=\"definition-highlighter\">MySQL<\/span><\/span><\/span><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"528\" data-local-id=\"c29158e2d780\">MongoDB<\/p>\n<\/li>\n<\/ul><hr role=\"presentation\"><h2 id=\"Step-1:-Get-Supabase-Project-Credentials\" data-local-id=\"fd75b1e0733e\" data-renderer-start-pos=\"540\"><strong data-renderer-mark=\"true\">Step 1: Get Supabase Project Credentials<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h2><ol class=\"ak-ol\" start=\"1\" data-local-id=\"6ad95b2e-d04b-408b-902e-89b98d68cebd\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"586\" data-local-id=\"a9595cb11995\">Log in to the <strong data-renderer-mark=\"true\">Supabase Dashboard<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"622\" data-local-id=\"c1f39813e611\">Open your Supabase project<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"652\" data-local-id=\"d4e930cd7529\">Navigate to <strong data-renderer-mark=\"true\">Project Settings &rarr; API<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"690\" data-local-id=\"687a42b97b32\">Locate:<\/p>\n<ul class=\"ak-ul\" data-local-id=\"1e4bdb11-de5a-4e11-8a2c-f1e0df996699\" data-indent-level=\"2\">\n<li>\n<p data-renderer-start-pos=\"701\" data-local-id=\"da112e0976c3\"><strong data-renderer-mark=\"true\">Project URL<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"716\" data-local-id=\"7892afbc679a\"><strong data-renderer-mark=\"true\">anon public API key<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol><div class=\"rich-media-item mediaSingleView-content-wrap image-wide css-dqx0jk\" data-layout=\"wide\" data-width=\"1168\" data-width-type=\"pixel\" data-node-type=\"mediaSingle\" data-vc=\"media-single\" data-renderer-start-pos=\"741\" data-media-vc-wrapper=\"true\" data-ssr-placeholder=\"Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-0\">\n<div class=\"css-1l355o7\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7721\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50.png\" alt=\"\" width=\"2513\" height=\"1041\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50.png 2513w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50-300x124.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50-1024x424.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50-768x318.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50-1536x636.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.24.50-2048x848.png 2048w\" sizes=\"auto, (max-width: 2513px) 100vw, 2513px\" \/><\/p>\n<div class=\"css-vhfmu2\" data-media-badges=\"true\" data-testid=\"media-badges\" data-ssr-placeholder=\"nouWf:Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-0\"><\/div>\n<div data-type=\"file\" data-node-type=\"media\" data-width=\"2513\" data-height=\"1041\" data-id=\"38d3988a-5a07-4b72-b153-ce4fc2f64002\" data-collection=\"contentId-1970274336\" data-file-name=\"Screenshot 2026-02-03 at 14.24.50.png\" data-file-size=\"184383\" data-file-mime-type=\"image\/png\" data-alt=\"Screenshot 2026-02-03 at 14.24.50.png\" data-renderer-start-pos=\"742\" data-local-id=\"41840eb6c9c8\" data-ssr-placeholder-ignored=\"\" data-context-id=\"1970274336\">\n<div id=\"newFileExperienceWrapper\" class=\"_2rkofajl _vchhusvi _kqswh2mm _ect4ttxp _p12f1osq _c71l1osq _1bsb1qmm _4t3ine4n _1hlmd0i9 _1rquusvi _eg541i5c _mts3kb7n _1ntskb7n _yfmhtlke _5sb1v00u new-file-experience-wrapper\" data-testid=\"media-card-view\" data-media-vc-wrapper=\"true\" data-ssr-placeholder-ignored=\"\">\n<div class=\"_1reo15vq _18m915vq _2rkofajl _1e0c1txw _kqswh2mm _p12f1osq _1bsb1osq _4t3i1osq _c71l1osq media-file-card-view\" data-testid=\"media-file-card-view\" data-test-status=\"complete\" data-test-source=\"ssr-server\" data-cursor=\"pointer\" data-ssr-placeholder-ignored=\"\" data-test-media-name=\"Screenshot 2026-02-03 at 14.24.50.png\" data-test-progress=\"1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7720\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54.png\" alt=\"\" width=\"2513\" height=\"1041\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54.png 2513w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54-300x124.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54-1024x424.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54-768x318.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54-1536x636.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.27.54-2048x848.png 2048w\" sizes=\"auto, (max-width: 2513px) 100vw, 2513px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div><div class=\"rich-media-item mediaSingleView-content-wrap image-wide css-1hqflkg\" data-layout=\"wide\" data-width=\"1162\" data-width-type=\"pixel\" data-node-type=\"mediaSingle\" data-vc=\"media-single\" data-renderer-start-pos=\"744\" data-media-vc-wrapper=\"true\" data-ssr-placeholder=\"Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-1\">\n<div class=\"css-1l355o7\"><\/div>\n<\/div><p data-renderer-start-pos=\"747\" data-local-id=\"ad3dff1e2870\">You will use these values as environment variables.<\/p><hr role=\"presentation\"><h2 id=\"Step-2:-Configure-Environment-Variables\" data-local-id=\"9c184b805811\" data-renderer-start-pos=\"801\"><strong data-renderer-mark=\"true\">Step 2: Configure Environment Variables<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h2><p data-renderer-start-pos=\"844\" data-local-id=\"d6fa813b29c5\">To connect quickly to Supabase, use the following environment variables.<\/p><p data-renderer-start-pos=\"918\" data-local-id=\"be6aed305d8c\">Create or update your .env file:<\/p><div class=\"fabric-editor-breakout-mark fabric-editor-block-mark css-p8f2xz\" data-mode=\"wide\" data-has-width=\"true\" data-width=\"760\">\n<div class=\"code-block css-ggxefa\" data-local-id=\"2dc3f46f-d2b0-427a-a58d-3db7476c282e\" data-ssr-placeholder=\"7voiQ:EfLS5:z8NN7:qz-Pe:Y6119-0\"><span class=\"prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf\" data-code-lang=\"\" data-ds--code--code-block=\"\" data-testid=\"renderer-code-block\"><code class=\"language-\"><span class=\"\" data-testid=\"renderer-code-block-line-1\" data-ds--code--row=\"\">SUPABASE_URL=https:\/\/your-project-id.supabase.co<br>\n<\/span><\/code><\/span><\/div>\n<div class=\"code-block css-ggxefa\" data-local-id=\"2dc3f46f-d2b0-427a-a58d-3db7476c282e\" data-ssr-placeholder=\"7voiQ:EfLS5:z8NN7:qz-Pe:Y6119-0\"><span class=\"prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf\" data-code-lang=\"\" data-ds--code--code-block=\"\" data-testid=\"renderer-code-block\"><code class=\"language-\"><span class=\"\" data-testid=\"renderer-code-block-line-2\" data-ds--code--row=\"\">SUPABASE_ANON_KEY=your-public-anon-key<\/span><\/code><\/span><\/div>\n<\/div><h3 data-local-id=\"9d5dcedd5e0b\" data-renderer-start-pos=\"1043\"><strong data-renderer-mark=\"true\">Environment variable explanation<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h3><ul class=\"ak-ul\" data-local-id=\"338edd38-3836-4983-b12f-f3fb0f5a16d8\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"1081\" data-local-id=\"12b44e933101\">SUPABASE_URL &ndash; Your Supabase project URL<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"1125\" data-local-id=\"55a227b07e8b\">SUPABASE_ANON_KEY &ndash; Your Supabase anonymous (public) API key<\/p>\n<\/li>\n<\/ul><div class=\"intercom-interblocks-callout\" style=\"background-color: #feedaf80;border-color: #fbc91633\">&#9888;&#65039; The <strong data-renderer-mark=\"true\">anon key is safe to use in server-side Node.js applications<\/strong>, but it should still be stored securely using environment variables and never hardcoded.<\/div><hr role=\"presentation\"><h2 id=\"Step-4:-Ensure-Your-Website-Contains-a-Supabase-Connection-File\" data-local-id=\"199be270fbaa\" data-renderer-start-pos=\"1353\"><strong data-renderer-mark=\"true\">Step 3: Ensure Your Website Contains a Supabase Connection File<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h2><p data-renderer-start-pos=\"1420\" data-local-id=\"04c4291ddc02\">Your Node.js application should include a <strong data-renderer-mark=\"true\">dedicated Supabase client file<\/strong> to handle database communication.<\/p><p data-renderer-start-pos=\"1530\" data-local-id=\"44bdfb787227\">This file is commonly located in:<\/p><ul class=\"ak-ul\" data-local-id=\"aa4ac390-dbdd-422a-a11e-e272a5711245\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"1567\" data-local-id=\"b7277c61d081\">config\/supabase.js<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"1589\" data-local-id=\"8d470eb68cf9\">lib\/supabaseClient.js<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"1614\" data-local-id=\"33a95ff72cc6\">supabase.js<\/p>\n<\/li>\n<\/ul><hr role=\"presentation\"><h3 data-local-id=\"e4f63ff3ea80\" data-renderer-start-pos=\"1630\"><strong data-renderer-mark=\"true\">Default Supabase Client Example (Node.js)<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h3><div class=\"fabric-editor-breakout-mark fabric-editor-block-mark css-p8f2xz\" data-mode=\"wide\" data-has-width=\"true\" data-width=\"760\">\n<div class=\"code-block css-ggxefa\" data-local-id=\"a0af11ef-3465-4bbe-ac5c-2ddca48d6ac8\" data-ssr-placeholder=\"7voiQ:EfLS5:z8NN7:qz-Pe:Y6119-1\">\n<p><span class=\"prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf\" data-code-lang=\"\" data-ds--code--code-block=\"\" data-testid=\"renderer-code-block\"><span class=\"prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf\" data-code-lang=\"\" data-ds--code--code-block=\"\" data-testid=\"renderer-code-block\"><code class=\"language-\"><\/code><\/span><\/span><\/p>\n<pre>import { createClient } from \"@supabase\/supabase-js\";\r\n\r\nconst supabase = createClient(\r\nprocess.env.SUPABASE_URL,\r\nprocess.env.SUPABASE_ANON_KEY\r\n);\r\n\r\nexport default supabase;<\/pre>\n<p><span class=\"prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf\" data-code-lang=\"\" data-ds--code--code-block=\"\" data-testid=\"renderer-code-block\"><code class=\"language-\"><\/code><\/span><\/p>\n<\/div>\n<\/div><p data-renderer-start-pos=\"1851\" data-local-id=\"51a621657794\">This client:<\/p><ul class=\"ak-ul\" data-local-id=\"b256240f-3e88-4f12-9461-e0e96dd81bb4\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"1867\" data-local-id=\"4d1d476119a7\">Authenticates using your Supabase project credentials<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"1924\" data-local-id=\"b5dc76185855\">Allows access to the database, authentication, and storage APIs<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"1991\" data-local-id=\"0d0766c21da7\">Requires no direct database connection handling<\/p>\n<\/li>\n<\/ul><hr role=\"presentation\"><h2 id=\"Step-5:-Deploy-application-with-environment-variables\" data-local-id=\"046342f65139\" data-renderer-start-pos=\"2043\"><strong data-renderer-mark=\"true\">Step 4: Deploy application with environment variables<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h2><ol class=\"ak-ol\" start=\"1\" data-local-id=\"8f28dc5d87c3\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"2100\" data-local-id=\"7a1f58e714f6\">Go to hPanel &gt; <strong data-renderer-mark=\"true\">Deployments<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2130\" data-local-id=\"597706bc01f5\">Select <strong data-renderer-mark=\"true\">Settings and redeploy<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2162\" data-local-id=\"bd7c396b052b\">Create SupaBase environment variables<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2203\" data-local-id=\"3d5d92899a69\">Click <strong data-renderer-mark=\"true\">save and redeploy<\/strong><\/p>\n<\/li>\n<\/ol><div class=\"rich-media-item mediaSingleView-content-wrap image-wide css-8kztw4\" data-layout=\"wide\" data-width=\"988\" data-width-type=\"pixel\" data-node-type=\"mediaSingle\" data-vc=\"media-single\" data-renderer-start-pos=\"2230\" data-media-vc-wrapper=\"true\" data-ssr-placeholder=\"Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-2\">\n<div class=\"css-18c0rwr\">\n<div class=\"css-vhfmu2\" data-media-badges=\"true\" data-testid=\"media-badges\" data-ssr-placeholder=\"nouWf:Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-2\"><\/div>\n<div data-type=\"file\" data-node-type=\"media\" data-width=\"2554\" data-height=\"1100\" data-id=\"dd9e64eb-26db-4952-8243-3a1e868f5d76\" data-collection=\"contentId-1970274336\" data-file-name=\"Screenshot 2026-02-03 at 14.36.50.png\" data-file-size=\"170226\" data-file-mime-type=\"image\/png\" data-alt=\"Screenshot 2026-02-03 at 14.36.50.png\" data-renderer-start-pos=\"2231\" data-local-id=\"62ea4bc928cc\" data-ssr-placeholder-ignored=\"\" data-context-id=\"1970274336\">\n<div id=\"newFileExperienceWrapper\" class=\"_2rkofajl _vchhusvi _kqswh2mm _ect4ttxp _p12f1osq _c71l1osq _1bsb1qmm _4t3ine4n _1hlmd0i9 _1rquusvi _eg541i5c _mts3kb7n _1ntskb7n _yfmhtlke _5sb1v00u new-file-experience-wrapper\" data-testid=\"media-card-view\" data-media-vc-wrapper=\"true\" data-ssr-placeholder-ignored=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7719\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50.png\" alt=\"\" width=\"2554\" height=\"1100\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50.png 2554w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50-300x129.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50-1024x441.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50-768x331.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50-1536x662.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.36.50-2048x882.png 2048w\" sizes=\"auto, (max-width: 2554px) 100vw, 2554px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div><hr role=\"presentation\"><h2 id=\"Step-6:-Create-Database-Tables-in-Supabase\" data-local-id=\"5df5c83a869e\" data-renderer-start-pos=\"2238\"><strong data-renderer-mark=\"true\">Step 5: Create Database Tables in Supabase<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h2><ol class=\"ak-ol\" start=\"1\" data-local-id=\"b38edb1c-29f3-47d1-ae83-9e30dd79a4bd\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"2286\" data-local-id=\"eb36b272370c\">Go to <strong data-renderer-mark=\"true\">Supabase Dashboard &rarr; SQL Editor<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2327\" data-local-id=\"9bdcf76b9957\">Enter SQL query based on the information you&rsquo;ll be storing<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2389\" data-local-id=\"fe2a7018e8de\">Ensure column names match what your application expects<\/p>\n<\/li>\n<\/ol><div class=\"rich-media-item mediaSingleView-content-wrap image-wide css-17lhfho\" data-layout=\"wide\" data-width=\"1000\" data-width-type=\"pixel\" data-node-type=\"mediaSingle\" data-vc=\"media-single\" data-renderer-start-pos=\"2450\" data-media-vc-wrapper=\"true\" data-ssr-placeholder=\"Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-3\">\n<div class=\"css-1l355o7\">\n<div class=\"css-vhfmu2\" data-media-badges=\"true\" data-testid=\"media-badges\" data-ssr-placeholder=\"nouWf:Eb7Gh:EfLS5:z8NN7:qz-Pe:Y6119-3\"><\/div>\n<div data-type=\"file\" data-node-type=\"media\" data-width=\"2513\" data-height=\"1041\" data-id=\"d2cf0876-f092-4f41-b91d-6ee2251aad7c\" data-collection=\"contentId-1970274336\" data-file-name=\"Screenshot 2026-02-03 at 14.30.54.png\" data-file-size=\"150433\" data-file-mime-type=\"image\/png\" data-alt=\"Screenshot 2026-02-03 at 14.30.54.png\" data-renderer-start-pos=\"2451\" data-local-id=\"8e5e354f65d9\" data-ssr-placeholder-ignored=\"\" data-context-id=\"1970274336\">\n<div id=\"newFileExperienceWrapper\" class=\"_2rkofajl _vchhusvi _kqswh2mm _ect4ttxp _p12f1osq _c71l1osq _1bsb1qmm _4t3ine4n _1hlmd0i9 _1rquusvi _eg541i5c _mts3kb7n _1ntskb7n _yfmhtlke _5sb1v00u new-file-experience-wrapper\" data-testid=\"media-card-view\" data-media-vc-wrapper=\"true\" data-ssr-placeholder-ignored=\"\">\n<div class=\"_1reo15vq _18m915vq _2rkofajl _1e0c1txw _kqswh2mm _p12f1osq _1bsb1osq _4t3i1osq _c71l1osq media-file-card-view\" data-testid=\"media-file-card-view\" data-test-status=\"complete\" data-test-source=\"ssr-server\" data-cursor=\"pointer\" data-ssr-placeholder-ignored=\"\" data-test-media-name=\"Screenshot 2026-02-03 at 14.30.54.png\" data-test-progress=\"1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7718\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54.png\" alt=\"\" width=\"2513\" height=\"1041\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54.png 2513w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54-300x124.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54-1024x424.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54-768x318.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54-1536x636.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/Screenshot-2026-02-03-at-14.30.54-2048x848.png 2048w\" sizes=\"auto, (max-width: 2513px) 100vw, 2513px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div><hr role=\"presentation\"><h2 id=\"Step-7:-Test-Database-Operations-in-Production\" data-local-id=\"781361f84c50\" data-renderer-start-pos=\"2456\"><strong data-renderer-mark=\"true\">Step 6: Test Database Operations in Production<\/strong><button class=\"css-x4slh0\" type=\"button\" data-testid=\"anchor-button\" aria-hidden=\"true\"><\/button><\/h2><p data-renderer-start-pos=\"2506\" data-local-id=\"6017a64b8851\">Example query using the Supabase client:<\/p><div class=\"fabric-editor-breakout-mark fabric-editor-block-mark css-p8f2xz\" data-mode=\"wide\" data-has-width=\"true\" data-width=\"760\">\n<div class=\"code-block css-ggxefa\" data-local-id=\"02c57922-a3fc-45dc-9512-f370bf557cd7\" data-ssr-placeholder=\"7voiQ:EfLS5:z8NN7:qz-Pe:Y6119-2\">\n<div class=\"css-9n57oc\">\n<div class=\"css-4osl21\">\n<div role=\"presentation\">\n<div>\n<pre>const { data, error } = await supabase\r\n.from(\"restaurant_workers\")\r\n.insert([\r\n{\r\nfirst_name: \"John\",\r\nlast_name: \"Doe\",\r\nemail: \"john@example.com\",\r\n},\r\n]);\r\n\r\nif (error) {\r\nconsole.error(error);\r\n}<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div><ol class=\"ak-ol\" start=\"1\" data-local-id=\"f70fa408-3f33-4d79-94ac-3079b4d7bed9\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"2776\" data-local-id=\"c9e160dbb329\">Trigger the operation from your live website<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2824\" data-local-id=\"296c5fc92b17\">Check the <strong data-renderer-mark=\"true\">Supabase Table Editor<\/strong><\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"2859\" data-local-id=\"32a6b73dd274\">Confirm the record was inserted successfully<\/p>\n<\/li>\n<\/ol><p data-renderer-start-pos=\"2909\" data-local-id=\"ce99e3ef3109\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7717\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911.png\" alt=\"\" width=\"2554\" height=\"1100\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911.png 2554w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911-300x129.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911-1024x441.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911-768x331.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911-1536x662.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123911-2048x882.png 2048w\" sizes=\"auto, (max-width: 2554px) 100vw, 2554px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7716\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946.png\" alt=\"\" width=\"2109\" height=\"481\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946.png 2109w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946-300x68.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946-1024x234.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946-768x175.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946-1536x350.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/image-20260203-123946-2048x467.png 2048w\" sizes=\"auto, (max-width: 2109px) 100vw, 2109px\" \/><\/p><p data-renderer-start-pos=\"2919\" data-local-id=\"643fd826678e\"><strong data-renderer-mark=\"true\">Congratulations, <\/strong>you&rsquo;ve successfully connected your SupaBase external database to your Hostinger Node.js application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connecting a Node.js application to a Supabase PostgreSQL database on Hostinger<\/p>\n","protected":false},"author":594,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[301],"tags":[],"class_list":["post-7715","post","type-post","status-publish","format-standard","hentry","category-node-js"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/7715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/594"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=7715"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/7715\/revisions"}],"predecessor-version":[{"id":8140,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/7715\/revisions\/8140"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=7715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=7715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=7715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}