@nginstack/engine-node 78.0.1 → 78.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,37 +1,37 @@
1
- # Engine Node
2
-
3
- Engine node API can be used to start and stop an Engine programmatically in a Node application.
4
-
5
- ## Install
6
-
7
- ### Prerequisites
8
-
9
- * [Node.js](https://nodejs.org) 16 or greater.
10
-
11
- ### Installation
12
-
13
- 1. Install **@nginstack/dev-tools** using npm:
14
-
15
- ```bash
16
- npm install @nginstack/engine-node
17
- ```
18
-
19
- ### Usage
20
-
21
- ```js
22
- const Engine = require('@nginstack/engine-node');
23
- const url = require('url');
24
- const request = require('request-promise-native');
25
-
26
- const engine = new Engine('installPath', 'http://myserver.com', 'DB_NAME');
27
- engine.install().then(() => {
28
- return engine.start();
29
- }).then(() => {
30
- return request.get(url.resolve(engine.url, '/api/service-status/v1/status'));
31
- }).then(body => {
32
- console.log(body);
33
- return engine.stop();
34
- }).catch(err => {
35
- console.error(err);
36
- });
37
- ```
1
+ # Engine Node
2
+
3
+ Engine node API can be used to start and stop an Engine programmatically in a Node application.
4
+
5
+ ## Install
6
+
7
+ ### Prerequisites
8
+
9
+ * [Node.js](https://nodejs.org) 16 or greater.
10
+
11
+ ### Installation
12
+
13
+ 1. Install **@nginstack/dev-tools** using npm:
14
+
15
+ ```bash
16
+ npm install @nginstack/engine-node
17
+ ```
18
+
19
+ ### Usage
20
+
21
+ ```js
22
+ const Engine = require('@nginstack/engine-node');
23
+ const url = require('url');
24
+ const request = require('request-promise-native');
25
+
26
+ const engine = new Engine('installPath', 'http://myserver.com', 'DB_NAME');
27
+ engine.install().then(() => {
28
+ return engine.start();
29
+ }).then(() => {
30
+ return request.get(url.resolve(engine.url, '/api/service-status/v1/status'));
31
+ }).then(body => {
32
+ console.log(body);
33
+ return engine.stop();
34
+ }).catch(err => {
35
+ console.error(err);
36
+ });
37
+ ```
package/index.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./lib/Engine');
1
+ module.exports = require('./lib/Engine');