Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.63 KB

README.md

File metadata and controls

42 lines (26 loc) · 1.63 KB

frontend-starter-app

React.js starter app for Red Hat Insights products that includes Patternfly 4 and shared Red Hat cloud service frontend components.

Alternative

Before using this template, please check the create-crc-app. It has some extra setup you may like.

Initial etc/hosts setup

In order to access the https://[env].foo.redhat.com in your browser, you have to add entries to your /etc/hosts file. This is a one-time setup that has to be done only once (unless you modify hosts) on each devel machine.

Best way is to edit manually /etc/hosts on your localhost line:

127.0.0.1 <your-fqdn> localhost prod.foo.redhat.com stage.foo.redhat.com

Alternatively you can do this by running following command:

npm run patch:hosts

If this command throws an error run it as a sudo:

sudo npm run patch:hosts

Getting started

  1. npm install

  2. npm run start

    1. If you are running the chrome-service-backend locally, set the environment variable CHROME_SERVICE to the port that it is listening on (by default 8000). For example, CHROME_SERVICE=8000 npm run start.
  3. Open browser in URL listed in the terminal output

Update appUrl string inside fec.config.js according to your application URL. Read more.

Testing

npm run verify will run npm run lint (eslint) and npm test (Jest)