Skip to content

Commit

Permalink
prepare for app packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mapper committed Mar 21, 2015
1 parent c4f0f11 commit 90ec9de
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 34 deletions.
9 changes: 0 additions & 9 deletions config/logs/web-1.log

This file was deleted.

9 changes: 0 additions & 9 deletions config/logs/web-2.log

This file was deleted.

9 changes: 0 additions & 9 deletions config/logs/web-3.log

This file was deleted.

6 changes: 3 additions & 3 deletions configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ var $ = require('jquery')
Ractive.DEBUG = false

var templates = {
configure: fs.readFileSync('./configure.tmpl').toString(),
detail: fs.readFileSync('./detail.tmpl').toString(),
about: fs.readFileSync('./about.html').toString()
configure: fs.readFileSync(__dirname + '/configure.tmpl').toString(),
detail: fs.readFileSync(__dirname + '/detail.tmpl').toString(),
about: fs.readFileSync(__dirname + '/about.html').toString()
}

var state = {}
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ app.on('ready', function() {
})

function loadConfig() {
var configFile = './config/config.json'
var configFile = __dirname + '/config/config.json'
var conf

try {
Expand Down Expand Up @@ -109,7 +109,7 @@ app.on('ready', function() {
})
configure.setPosition(size.workArea.width - 500, size.workArea.y)
configure.on('blur', hideConfigure)
configure.loadUrl('file://' + __dirname + '/configure.html')
configure.loadUrl('file://' + __dirname + '/index.html')
}

function hideConfigure() {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "monu",
"productName": "Monu",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
43 changes: 41 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
### work in progress
### Monu

![screenshot.png](screenshot.png)
<p>Monu is an open source process monitoring menu bar application for Mac OS. You can configure Monu to launch programs, and when Monu starts up it will start them. Additionally, it will monitor the processes and restart them if they crash.</p>

<p>Monu is a portmanteau of 'monitor' and 'menu'. It has two C/C++ dependencies, [Atom Shell](https://github.com/atom/atom-shell) (which includes iojs) and the [mon](https://github.com/tj/mon) process monitor.</p>

<p>To download the latest version visit the [releases page](https://github.com/maxogden/monu/releases)</p>

![screenshot.png](screenshot.png)

##### How to use Monu
<p>To configure Monu, click 'Open Config Folder' and open 'config.json' in a text editor. When you save and return to Monu your new configuration will be automatically loaded.</p>
<p>Be sure your JSON syntax is valid when editing the configuration. Here are supported options. These should be added as top level key/value pairs to 'config.json':</p>
<ul>
<li><b>processes</b> the processes to run (see below)</li>
<li><b>logs</b> the directory to store logs in (default config/pids)</li>
<li><b>pids</b> the directory to store PIDs in (default config/logs)</li>
<li><b>on-error</b> a command to run when a process cannot start (default none)</li>
<li><b>on-restart</b> a command to run when a process restarts (default none)</li>
<li><b>sleep</b> sleep seconds before re-executing (default 1)</li>
<li><b>attempts</b> restart attempts within 60 seconds before stopping app (default 10)</li>
<li><b>prefix</b> add a string prefix to the log (default none)</li>
</ul>

##### Adding Processes
<p>In the 'config.json' file add processes to the 'processes' key. The key must be a name (lowercase letters and hypens) and the value must be the launch command. For example:<p>

```json
{
"logs": "./logs",
"pids": "./pids",
"processes": {
"web-1": "http-server . -p 8081",
"web-2": "http-server . -p 8082",
"web-3": "http-server . -p 8083"
}
}
```

##### Launch on Startup
<p>When you open Monu.app, it will start all configured processes.</p>
<p>If you would like Monu.app to start when your Mac starts up, got to <b>System Preferences &gt; Users and Groups</b> and add Monu.app to <b>Login Items</b> for your User.</p>
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 90ec9de

Please sign in to comment.