Skip to content

Latest commit

 

History

History
97 lines (67 loc) · 3.55 KB

README.md

File metadata and controls

97 lines (67 loc) · 3.55 KB

My REST API demonstration project

This project includes a collection of repositories that demonstrate REST web services in a variety of languages and frameworks.

This repository (rest-demo) primarily just contains documentation and testing materials for use by the other rest-demo-* repositories.

Repositories in this project

Frontend(s)

Backend(s)

Database

Installation and Deployment

Here are two methods for installing and deploying applications from this collection of rest-demo-* repos.

Following the instructions for any one of these methods should setup an integrated pair of instances: one for the frontend (the REST client UI), and one for the backend (the REST API web service).

Method 1: Using Docker & docker-compose (preferred)

Requirements:

  • git - version 1.7.10 or later recommended
  • Docker - version 17.05 or later
  • docker-compose - version 1.12.0 or later

This method will build two Docker images, one for the frontend and one for the backend, and then create and run container instances based on each of them.

Run the following commands to use this method:

> git clone https://github.com/bmarcotte/rest-demo.git
> cd rest-demo
> FRONTEND=react BACKEND=java docker-compose up -d --build

...where FRONTEND=react is used to select the rest-demo-react-frontend repo as the source for the REST client UI application, and BACKEND=java is used to select the rest-demo-java-backend repo as the REST API web service application.

NOTE: Currently, react is the default value for FRONTEND, and java is the default value for BACKEND, so if you'd like to spin up a pair of those particular instances, then you can omit the environment variables at the beginning, so the last command above can be simplified to the following:

> docker-compose up -d --build

Method 2: Manually

Requirements:

  • git - version 1.7.10 or later recommended
  • See the repo-specific installation method(s) for additional tools required.

If docker-compose is not available, you can download the backend and frontend repos manually, and then follow the installation steps specific to each repo.

Run the following commands to use this method:

git clone https://github.com/bmarcotte/rest-demo-java-backend.git backend
git clone https://github.com/bmarcotte/rest-demo-react-frontend.git frontend

cd backend
# backend specific steps...

cd ../frontend
# frontend specific steps...

See the README.md files in each of those repos for more information on the installation and deployments steps specific to each of those applications.

Testing

Documentation describing how to test the backend web services can be found here:

Author

License

This project is licensed under the MIT License - see the LICENSE file for details