Giter Club home page Giter Club logo

rest-demo-react-frontend's Introduction

REST demo: React frontend

A simple demonstration of a REST client UI in React.

This repository implements a REST client application for managing a simple database of bookmarks. Each bookmark consists of a name (the link text) and the URL that it should link to.

This repository is part of my REST API demonstration project. For more information on this project, including a list of all available frontends and backends, please visit the following repo:

Installation and Deployment

There are configuration files in this repository to support installing and deploying this code through three different methods. Following the instructions for any one of these methods should setup a local running instance of this application.

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

The easiest way to try out the code in this repository is via the docker-compose method described in the README for the main rest-demo project:

To request this frontend specifically, make sure your docker-compose command is prefixed with FRONTEND=react, like so:

> FRONTEND=react docker-compose up -d --build

For more details, please see the "Method 1" section in the README link above.

Method 2: Using Docker without docker-compose

Requirements:

  • git - version 1.7.10 or later recommended
  • Docker - version 17.05 or later

This method will build a Docker image for this application, and then create and run a container instance based on it.

Run the following commands to use this method:

> docker build -t frontend:deploy https://github.com/bmarcotte/rest-demo-react-frontend.git
> docker run --link bookmarkapi --name frontend -p 3000:3000 -d frontend:deploy

Note: The commands above assume that one of the REST demo backends is already up and running in Docker, in a container named bookmarkapi, with port 8080 mapped. Please see the Backend(s) section of the main rest-demo project README for more information.

Method 3: Using node and npm

Requirements:

  • git - version 1.7.10 or later recommended
  • node - version 6.12 or later
  • npm - version 5.6 or later

If Docker is not available, you can try manually building and installing the application via this method.

Run the following commands to use this method:

git clone https://github.com/bmarcotte/rest-demo-react-frontend.git
cd rest-demo-react-frontend
npm install
npm run start-dev

Testing

Requirements:

  • npm - version 5.6 or later

This repository includes a simple test suite that can be invoked with the following command:

CI=true npm test

For details on how to do more extensive functional endpoint testing of the backend web services, please see the following documentation in my rest-demo project repository:

Notes

This project was bootstrapped with Create React App.

Author

License

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

rest-demo-react-frontend's People

Contributors

bmarcotte avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.