1 | apeman-d
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
9 | <a name="badges"></a>
|
10 |
|
11 | [![Build Status][bd_travis_shield_url]][bd_travis_url]
|
12 | [![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
|
13 | [![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
|
14 | [![npm Version][bd_npm_shield_url]][bd_npm_url]
|
15 |
|
16 | [bd_repo_url]: https://github.com/apeman-cmd-labo/apeman-d
|
17 | [bd_travis_url]: http://travis-ci.org/apeman-cmd-labo/apeman-d
|
18 | [bd_travis_shield_url]: http://img.shields.io/travis/apeman-cmd-labo/apeman-d.svg?style=flat
|
19 | [bd_license_url]: https://github.com/apeman-cmd-labo/apeman-d/blob/master/LICENSE
|
20 | [bd_codeclimate_url]: http://codeclimate.com/github/apeman-cmd-labo/apeman-d
|
21 | [bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-cmd-labo/apeman-d.svg?style=flat
|
22 | [bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-cmd-labo/apeman-d.svg?style=flat
|
23 | [bd_gemnasium_url]: https://gemnasium.com/apeman-cmd-labo/apeman-d
|
24 | [bd_gemnasium_shield_url]: https://gemnasium.com/apeman-cmd-labo/apeman-d.svg
|
25 | [bd_npm_url]: http://www.npmjs.org/package/apeman-d
|
26 | [bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-d.svg?style=flat
|
27 | [bd_bower_badge_url]: https://img.shields.io/bower/v/apeman-d.svg?style=flat
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | <a name="description"></a>
|
34 |
|
35 | Daemon manager for apeman.
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | <a name="overview"></a>
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | <a name="sections"></a>
|
50 |
|
51 |
|
52 |
|
53 | <a name="section-doc-guides-01-installation-md"></a>
|
54 | Installation
|
55 | -----
|
56 |
|
57 | Install apeman-d module via [npm][npm_url].
|
58 | ```bash
|
59 | $ npm install apeman-d -g
|
60 | ```
|
61 |
|
62 |
|
63 | [npm_url]: https://www.npmjs.com/
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | <a name="section-doc-guides-02-usage-md"></a>
|
71 | Usage
|
72 | ---------
|
73 |
|
74 | 1. Prepare an Apemanfile.js at your project root.
|
75 | 2. Run the command via CLI.
|
76 |
|
77 | ***Apemanfile.js***
|
78 | ```javascript
|
79 | /** Example of Apemanfile.js */
|
80 |
|
81 | "use strict";
|
82 |
|
83 | module.exports = {
|
84 | $pkg: require('./package.json')
|
85 | };
|
86 | ```
|
87 |
|
88 | Then,
|
89 |
|
90 | ```bash
|
91 | $ apeman-d
|
92 | ```
|
93 |
|
94 |
|
95 | ##### CLI Options
|
96 |
|
97 | ```bash
|
98 | $ apeman-d -h
|
99 |
|
100 | Usage: apeman-d [options] <action> <script>
|
101 |
|
102 | Daemon manager for apeman.
|
103 |
|
104 | Options:
|
105 |
|
106 | -h, --help output usage information
|
107 | -V, --version output the version number
|
108 | -v, --verbose Show verbose logs
|
109 | -f, --force Force to action
|
110 | -c, --configuration <configuration> Pathname of Apemanfile
|
111 |
|
112 | Examples:
|
113 |
|
114 | $ apeman-d start ./app/ui-app.js # Start an app.
|
115 |
|
116 |
|
117 | ```
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 | <a name="section-doc-guides-03-programmatic-a-p-i-md"></a>
|
125 | Programmatic API
|
126 | ---
|
127 |
|
128 | apeman-d also provide programmatic API.
|
129 |
|
130 | Firstly, install the module locally.
|
131 |
|
132 | ```bash
|
133 | $ npm install apeman-d --save-dev
|
134 | ```
|
135 |
|
136 | Then,
|
137 |
|
138 | ```javascript
|
139 | "use strict";
|
140 |
|
141 | const apemanD = require('apeman-d'),
|
142 | Apemanfile = require.resolve('./Apemanfile.js');
|
143 |
|
144 | apemanD.start({
|
145 | configuration: Apemanfile
|
146 | }, (err) => {
|
147 | /*...*/
|
148 | });
|
149 | ```
|
150 |
|
151 |
|
152 | ##### Programmatic Options
|
153 |
|
154 | | Key | Description | Default |
|
155 | | --- | ----------- | ------- |
|
156 | | verbose | Show verbose logs | |
|
157 | | force | Force to action | |
|
158 | | configuration | Pathname of Apemanfile | |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 | <a name="license"></a>
|
169 |
|
170 | License
|
171 | -------
|
172 | This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-d/blob/master/LICENSE).
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | <a name="links"></a>
|
179 |
|
180 | Links
|
181 | ------
|
182 |
|
183 | + [apeman](http://github.com/apeman-labo/apeman)
|
184 | + [apeman-cmd-labo](http://github.com/apeman-cmd-labo)
|
185 |
|
186 |
|