Learn how to build a REST API with the Express.js framework using Node.js and MySQL to easily write a new microservice.
In this tutorial, we will see how we can build a REST API with MySQL as the database and Node.js as our language. To make our task easier, we will use the Express.js framework.
Node.js is generally coupled with MongoDB and other NoSQL databases, but it performs well with relational databases like MySQL, too. In case you want to write a new microservice with Node.js for an existing database, it’s highly likely that the existing database will be the world’s most popular open-source database, MySQL.
Let’s get cracking!
Below are some assumptions we are making before we get into the code:
All the code will be done on a Mac with Node 14 LTS installed. If you want, you can try to use Node.js and Docker and docker-compose for a better developer experience.
#node #express #mysql #api #javascript