hyperjumptech / monika

Monika is a command line application to monitor every part of your web app using a simple YAML configuration file. Get alert not only when your site is down but also when it's slow.
https://monika.hyperjump.tech
MIT License
597 stars 66 forks source link

Add suggestion for opening monika config generator page when running Monika the first time #143

Closed ilmiawan closed 3 years ago

ilmiawan commented 3 years ago

Describe the bug Currently when we try to run Monika in the first time, there is an error state that there is missing configuration file and link to monika example.

To Reproduce Steps to reproduce the behavior:

  1. Go to empty directory
  2. run npx run @hyperjumptech/monika
  3. See error

Expected behavior When first time Running and cannot find configuration, directly open monika config generator in local browser.

newm4n commented 3 years ago

Not only first time though. But every time configuration file not found.

newm4n commented 3 years ago

From Pak @ariya

This is how Fossil did it. https://fossil-scm.org/home/help?cmd=ui

This is how git did it. (although its read only)

git instaweb -httpd=webrick
ariya commented 3 years ago

fish_config is a fantastic prior-art: https://fishshell.com/docs/current/cmds/fish_config.html

nicnocquee commented 3 years ago

For first iteration, let's do this:

Configuration file not found. By default, Monika looks for monika.json configuration file in the current directory. Otherwise, you can also specify a configuration file using -c flag as follows

monika -c <path_to_configuration_file>

You can create a configuration file via web interface by opening this web app: https://hyperjumptech.github.io/monika-config-generator/