moira-alert / web2.0

Moira web application based on React
MIT License
11 stars 31 forks source link
alerting hacktoberfest moira monitoring

Moira Web 2.0

This repo is for Moira's Web UI built on React/TypeScript. If you're new here, please check out our main README.

Development

You need Node.js and Yarn installed. After cloning the repo, make sure you have all dependencies installed by running yarn install.

Building

yarn build

All files will be prepared in the dist folder.

Developing

yarn start

Starts a dev server on port 9000 and a fakeapi server (provides mock api data) on port 9002, in parallel. This is not recommended because the fakeapi server may not be 100% consistent with the actual backend.

yarn start:dev-proxy

Starts a dev server on port 9000 and proxies all API requests to a separately deployed backend. The URL for API requests can be set with the MOIRA_API_URL env variable. Supports basic auth which can be configured using MOIRA_API_LOGIN and MOIRA_API_PASSWORD env variables.

yarn start:docker

Starts a dev server on port 9000 and a dockerized backend instance, in parallel. API requests are proxied to Docker.

yarn storybook

Starts Storybook on port 9001.

yarn lint

ESLint check. Will run before every commit via husky.

yarn tsc --noEmit

Runs the TypeScript compiler for type-safety checking. Will run before every commit via husky.

Contributing

First of all, thank you for your help!

For contributors, we have two major rules: