A simple RESTful API built using Node.js, MySQL with Docker compose
Make sure your computer has a newer version of Docker with Docker Compose CLI before running this project. Clone the repository with the following command:
git clone https://github.com/codezri/node-rest-api-demo.git
cd node-rest-api-demo
Start Docker Compose services:
docker-compose up -d
Once the MySQL and Node.js containers are up, you can access the API with the following URL:
http://localhost:5000
This project uses the Artillery test runner to run load tests. First, install the Artillery CLI into your computer:
npm install -g artillery@latest
# --- or ---
yarn global add artillery@latest
Make sure the web service works by sending a simple HTTP request as follows:
curl http://localhost:5000
Run the load test suite:
npm run load-test
# --- or ---
yarn load-test
Thanks Jeremy Morgan for creating this public Gist. I added US state details to the demo_db.sql file using that Gist's content.