зеркало из https://github.com/Azure/Sia-EventUI.git
Documentation updates
This commit is contained in:
Родитель
788ba873e0
Коммит
8d1620e4a7
56
README.md
56
README.md
|
@ -6,7 +6,7 @@
|
|||
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Azure/Sia-Root/blob/master/HOWTOCONTRIBUTE.md)
|
||||
|
||||
# This is the user interface for SRE Incident Assistant (SIA)
|
||||
See the [Root repository](https://github.com/azure/Sia-Root) for full project information.
|
||||
See the [Root repository](https://github.com/azure/Sia-Root) for full project information and an overview of how services fit together.
|
||||
|
||||
SIA is built using:
|
||||
+ [ReactJs](https://facebook.github.io/react/)
|
||||
|
@ -15,28 +15,52 @@ SIA is built using:
|
|||
|
||||
SIA is configured for Wepback's hot module reloading, so changes should automatically appear in your browser.
|
||||
|
||||
# Before You Start
|
||||
You will need to add const files in config for each environment you want to use; these are not tracked in git. See <code>cfg/constExample.js</code> for more details. Const files follow the naming convention $env.const.js (localhost.const.js is the const file loaded by localhost.js, for example).
|
||||
# Requirements
|
||||
+ Node.js (latest LTS is preferred)
|
||||
|
||||
# To start
|
||||
+ Have Node.js installed (the latest LTS release is preferred)
|
||||
+ Create a localhost.const.js file inside the cfg folder. Use the <code>cfg/constExample.js</code> file as a template.
|
||||
+ Navigate to the SIA-EventUI source directory (the directory this file is in (<code>README.md</code>)) and enter these commands:
|
||||
+ `npm install`
|
||||
+ `npm run serve`
|
||||
# Before You Start
|
||||
You will need to add const files in config for each environment you want to use; these are not tracked in git. See <code>cfg/constExample.js</code> for more details. Const files follow the naming convention $env.const.js (`localhost.const.js` is the const file loaded by localhost.js, for example).
|
||||
|
||||
# Launch UI pointing at a local Gateway API
|
||||
Use these steps to launch if you're hosting your Gateway API locally.
|
||||
+ Navigate to the SIA-EventUI source directory root
|
||||
+ Ensure your local copy of the gateway API is running on http://localhost:50000 (or the base URL you configured)
|
||||
+ Enter these commands to launch the Event UI:
|
||||
```
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
+ Navigate to http://localhost:3000
|
||||
|
||||
# To start pointing at local API
|
||||
+ Have Node.js installed (the latest LTS release is preferred)
|
||||
+ Navigate to the SIA-EventUI source directory (the directory this file is in (<code>README.md</code>))
|
||||
+ Start the gateway project and all dependencies by entering these commands:
|
||||
+ `npm install`
|
||||
+ `npm start`
|
||||
# Launch UI pointing at a remote dev Gateway API
|
||||
Use these steps if you're working on the Event UI and do not need to run a local copy of the gateway.
|
||||
|
||||
+ Create a localhost.const.js file inside the cfg folder. Use the <code>cfg/constExample.js</code> file as a template.
|
||||
+ Navigate to the SIA-EventUI source directory root
|
||||
+ Enter these commands to launch the Event UI:
|
||||
```
|
||||
npm install
|
||||
npm run serve
|
||||
```
|
||||
+ Navigate to http://localhost:3000
|
||||
|
||||
# To Test
|
||||
+ Enter this command:
|
||||
+ `npm test`
|
||||
|
||||
```
|
||||
npm test
|
||||
```
|
||||
|
||||
# To create dist bundle, no server
|
||||
```
|
||||
webpack --env=dist
|
||||
```
|
||||
|
||||
# NPM scripts
|
||||
|
||||
A partial list of run scripts and what they do
|
||||
|
||||
| Script | What it does |
|
||||
| ------ | ------------ |
|
||||
| start | Launch the server and point at a gateway hosted on localhost (use `localhost.const.js`) |
|
||||
| serve | Launch the server and point at a gateway hosted in the dev environment (use `dev.const.js`) |
|
Загрузка…
Ссылка в новой задаче