Skip to content

mariajosematar/APIrest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build a REST API with Node.js, Express, and MySQL

Prerequisites 🤓 :

  • Understanding of how MySQL and relational databases work in general
  • Basic knowledge of Node.js and Express.js
  • Understanding of what REST (representational state transfer) APIs are and how they function
  • Knowledge of what CRUD (create, read, update, delete) is and how it relates to the HTTP methods GET, POST, PUT, and DELETE

Table of contents:

  • Create the programming languages table
  • Add demo rows for programming languages
  • Setting up Express.js for our REST API
  • REST API project structure
  • GET popular programming languages
  • POST a new programming language
  • PUT to update an existing programming language
  • DELETE a programming language
  • Testing our APIs

Conclusion:

  • We have a working API server that uses Node.js and MySQL.

  • In this repository, you will find how to configure MySQL in a free service (https://db4free.net/). We then create an Express.js server that can handle various HTTP methods regarding how it is translated to SQL queries.

  • The sample REST API in this repository serves as a good starting point and foundation for building real-world production-ready REST APIs.

I hope you enjoyed this article, happy coding! 🤗

Releases

No releases published

Packages

No packages published