Server Side and Database compatibility?

Sorry that I am a noob, but like I’m a bit confused as to what l can and can’t do with server side languages on Netlify.

“You can use these languages (Node, Ruby, Python, PHP and many others) to build the site, but you can not use the language on the web server after the site is deployed.”

So… if possible can someone clarify this for me? I personally want to add node.js code to my website as well as a database or something, and I’m not sure if it’s possible or how it’s possible. :stuck_out_tongue:

Thank you.

Hi, @Henny4315. Welcome to our community site! :slight_smile:

There is no way to run node.js code on the server that serves the site at Netlify. You can write a API in node and then use javascript in the browser to call that API (javascript and APIs being the J and A in JAMStack) but the server that sends the site content will not be the same server hosting the API.

Again, on the deployed site, there is no support for any server side language.

For APIs, we have Netlify Functions. It is also possible to deploy your own APIs to other services (AWS Lambda, Heroku, etc) and call those APIs from the client side javascript of the site at Netlify.

To summarize, it simply isn’t possible to run code on the web server itself for sites at Netlify. Doing so, would be not following the design principles of the JAMStack.

1 Like