Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCrystal Vesely
14,391 PointsCan I use JavaScript to connect SQL databases to a website?
I’ve spent the last year and a half learning html, css, JavaScript, and SQL within the TreeHouse community. I’d still consider myself a beginner; I have enough knowledge to get me started, but I still have loads to learn. For my first project, I want to develop a website where employees can enter warranty info, and use the website to search the database for specific data. I am stuck trying to figure out how I connect a SQL database to a website. Can I use JavaScript? Or do I need to learn Python, etc?
1 Answer
Rohald van Merode
Treehouse StaffHey Crystal Vesely 👋
You can definitely use JavaScript to interact with your SQL database! It would require setting up some server side code using Node. I'd recommend checking out the Full Stack JavaScript track, if you haven't done so already. You most likely already completed a lot of the client-side JavaScript courses in there, but towards the end you'll learn about Express, how to create your own REST API and finally Sequelize to interact with your Database 😃
Combining these tools will help you create an API which you can then interact with on your client side website/app 🙂
Hope this answers your question!
Happy Coding 🧑💻
Crystal Vesely
14,391 PointsCrystal Vesely
14,391 PointsWow thank you! Because I am still so new at this. Sometimes, it’s hard to know which direction to move in! Thank you for taking the time to answer my question!