1.0.0 • Published 6 years ago

ocp.ui v1.0.0

Weekly downloads
2
License
ISC
Repository
-
Last release
6 years ago

Installations

* Nodemon- nodemon is a tool that helps develop node.js based applications by automatically
           restarting the node application when file changes in the directory are detected.
* Concurrently - Run multiple commands concurrently. Like npm run watch-js & npm run watch-less but better.

Using

Development Mode:
    * npm run dev - Running the React app and the server the at the same time with.
Building/Running your docker image:
    (1) docker build -t <your username>/ocp-ui
    (2) docker run -d -p <public_port>:8080 -d <your username>/ocp-ui

Client - Server Interaction

The key to using an Express back-end server with a project created with create-react-app
is to use a proxy. This tells the Web-pack development server to proxy our API requests to
our API server, given that our Express server is running on localhost:8000.

### Example for a call: fetch('/api/hello'); ###
Notice we didn’t use a fully qualified URL http://localhost:8000/api/hello to call our API,
even though our React app runs on a different port (3000).
This is because of the proxy line we added to the package.json

Testing Pull Request