Do I need Node.js to interact with a SQL database?

Let me start by saying I’m only about 20% into the Full-Stack Course, so it’s entirely possible i simply don’t how much it is i don’t know. And i don’t know how things actually interact with each other.

The short version of my question is, Do i NEED node.js if i want to interact with a SQL database using Javascript?

I have a project in mind that I’m trying to learn how to program. Without going into unnecessary detail, it will be a website that has HTML forms. Those forms will be saved to a SQL database. Then that database can be viewed as a table on the website. There will probably be search functions, maybe a few reports. But boiled down to the bones. Forms get saved to SQL and get displayed back as tables.

Looking ahead at the Full-Stack syllabus, if I’m reading it right, it looks like it’s going to teach me to use Node.js to interact with the SQL database as the bridge between the front end and the back end. My problem comes from the fact that when i was pricing out web hosting, a simple website is as cheap as $3 a month. But the handful of hosting sites i looked at don’t support Node.js unless i get a dedicated server, which bumps that price up to the range of $70 a month. Way outside my budget for a silly little personal project that could just as easily be solved with an excel sheet.

Is this going to be a brick wall for me? Or am i misunderstanding the needs of my project? Or what path should i look down to avoid using node for this project?

Basically, i don’t want to “waste” the next 4 months learning how to program this project just to find out I’m not willing to pay the price to host it. So i’d like to plot my course now to avoid what looks to be a serious obstacle down the road.

You will need some back-end language to communicate with your database, this can be node, but doesn’t have to be, can be ruby, python, golang, php, c#, java or something else as well

You can build the project entire project on your computer, then once you decide you are ready you can deploy. This should not cost $70 a month. A simple VPS (virtual personal server) should be $5 a month or so. If you need SSL, you can look into let’s encrypt (which I believe is free)

2 Likes

If you decide to build your API with something other than Node, you’ll have to look into other resources as well since Codecademy only covers building a REST API with Node Express, if I didn’t miss anything.
I recommend taking a look at Slim , a microframework for PHP.

Have you looked up www.heroku.com? They have node.js with a free plan.

I’ve heard of Heroku, but I’ve never really looked into it before. I’ll keep that in mind.

At the moment, I’m thinking i might look at learning PHP as the back end. Most of the hosting I’ve looked at so far appear to offer support for PHP with the basic hosting.

Glitch or netlify might work for you too.