mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-18 18:55:54 +08:00
Add README and LICENSE files
This commit is contained in:
parent
aa2cc37cd9
commit
5c02a62b8e
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Kentaro Hibino
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
43
README.md
Normal file
43
README.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Asynqmon
|
||||||
|
|
||||||
|
Asynqmon is a web based tool for monitoring and administrating Asynq queues and tasks.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Release binaries
|
||||||
|
|
||||||
|
You can download the release binary for your system from the
|
||||||
|
[releases page](https://github.com/hibiken/asynqmon/releases).
|
||||||
|
|
||||||
|
### Building from source
|
||||||
|
|
||||||
|
To build Asynqmon from source code, first ensure that have a working
|
||||||
|
Go environment with [version 1.16 or greater installed](https://golang.org/doc/install).
|
||||||
|
You also need [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com/)
|
||||||
|
installed in order to build the frontend assets.
|
||||||
|
|
||||||
|
Download the source code and then run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ make build
|
||||||
|
```
|
||||||
|
|
||||||
|
The `asynqmon` binary should be created in the current directory.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To start the server, run
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ asynqmon
|
||||||
|
```
|
||||||
|
|
||||||
|
Pass flags to specify port, redis server address, etc.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ asynqmon --port=3000 --redis_addr=localhost:6380
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Asynqmon is released under the MIT license. See [LICENSE](https://github.com/hibiken/asynqmon/blob/master/LICENSE).
|
59
ui/README.md
59
ui/README.md
@ -1,44 +1,53 @@
|
|||||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
# Working with the React UI
|
||||||
|
|
||||||
## Available Scripts
|
This file explains how to work with Asynqmon UI.
|
||||||
|
|
||||||
In the project directory, you can run:
|
## Introduction
|
||||||
|
|
||||||
### `yarn start`
|
The Asynqmon UI was bootstrapped using [Create React App](https://github.com/facebook/create-react-app), a popular toolkit for generating React application setups. You can find general information about Create React App on [their documentation site](https://create-react-app.dev/).
|
||||||
|
|
||||||
Runs the app in the development mode.<br />
|
Instead of plain JavaScript, we use [TypeScript](https://www.typescriptlang.org/) to ensure typed code.
|
||||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
||||||
|
|
||||||
The page will reload if you make edits.<br />
|
## Development environment
|
||||||
You will also see any lint errors in the console.
|
|
||||||
|
|
||||||
### `yarn test`
|
To work with the React UI code, you will need to have the following tools installed:
|
||||||
|
|
||||||
Launches the test runner in the interactive watch mode.<br />
|
- The [Node.js](https://nodejs.org/) JavaScript runtime.
|
||||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
- The [Yarn](https://yarnpkg.com/) package manager.
|
||||||
|
- _Recommended:_ An editor with TypeScript, React, and [ESLint](https://eslint.org/) linting support. See e.g. [Create React App's editor setup instructions](https://create-react-app.dev/docs/setting-up-your-editor/). If you are not sure which editor to use, we recommend using [Visual Studio Code](https://code.visualstudio.com/docs/languages/typescript). Make sure that [the editor uses the project's TypeScript version rather than its own](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript).
|
||||||
|
|
||||||
### `yarn build`
|
**NOTE**: When using Visual Studio Code, be sure to open the `ui/` directory in the editor instead of the root of the repository. This way, the right ESLint and TypeScript configuration will be picked up from the React workspace.
|
||||||
|
|
||||||
Builds the app for production to the `build` folder.<br />
|
## Installing npm dependencies
|
||||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
||||||
|
|
||||||
The build is minified and the filenames include the hashes.<br />
|
The React UI depends on a large number of [npm](https://www.npmjs.com/) packages. These are not checked in, so you will need to download and install them locally via the Yarn package manager:
|
||||||
Your app is ready to be deployed!
|
|
||||||
|
|
||||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
yarn
|
||||||
|
|
||||||
### `yarn eject`
|
Yarn consults the `package.json` and `yarn.lock` files for dependencies to install. It creates a `node_modules` directory with all installed dependencies.
|
||||||
|
|
||||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
**NOTE**: Remember to change directory to `ui/` before running this command and the following commands.
|
||||||
|
|
||||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
## Running a local development server
|
||||||
|
|
||||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
You can start a development server for the React UI outside of a running Asynqmon server by running:
|
||||||
|
|
||||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
yarn start
|
||||||
|
|
||||||
## Learn More
|
This will open a browser window with the React app running on http://localhost:3000/. The page will reload if you make edits to the source code. You will also see any lint errors in the console.
|
||||||
|
|
||||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
## Building the app for production
|
||||||
|
|
||||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
To build a production-optimized version of the React app to a `build` subdirectory, run:
|
||||||
|
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
**NOTE:** You will likely not need to do this directly. Instead, this is taken care of by the `build` target in the main Asynqmon `Makefile` when building the full binary.
|
||||||
|
|
||||||
|
## Integration into Asynqmon
|
||||||
|
|
||||||
|
To build a Asynqmon binary that includes a compiled-in version of the production build of the React app, change to the root of the repository and run:
|
||||||
|
|
||||||
|
make build
|
||||||
|
|
||||||
|
This installs npm dependencies via Yarn, builds a production build of the React app, and then finally compiles in all web assets into the Asynqmon binary.
|
||||||
|
Loading…
Reference in New Issue
Block a user