File tree 4 files changed +1
-31
lines changed
examples/post-start-secret-delivery
test/fixtures/post_start_hook
4 files changed +1
-31
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ const fs = require('fs').promises;
4
4
/**
5
5
* This is a post-start hook that will be called after an app started.
6
6
* @param {object } info
7
- * @param {string } info.pid The apps PID
7
+ * @param {number } info.pid The apps PID
8
8
* @param {Stream } info.stdin The apps STDIN stream
9
9
* @param {Stream } info.stdout The apps STDOUT stream
10
10
* @param {Stream } info.stderr The apps STDERR stream
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- /**
4
- * This is a post-start hook that will be called after an app started.
5
- * @param {object } info
6
- * @param {string } info.pid The apps PID
7
- * @param {object } info.stdin The apps STDIN stream
8
- * @param {object } info.stdout The apps STDOUT stream
9
- * @param {object } info.stderr The apps STDERR stream
10
- * @param {object } pm2_env The apps environment variables
11
- * @returns {void }
12
- */
13
3
module . exports = function hook ( info , cb ) {
14
4
cb ( new Error ( 'error-from-post-start-hook-' + info . pid ) ) ;
15
5
}
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- /**
4
- * This is a post-start hook that will be called after an app started.
5
- * @param {object } info
6
- * @param {string } info.pid The apps PID
7
- * @param {Stream } info.stdin The apps STDIN stream
8
- * @param {Stream } info.stdout The apps STDOUT stream
9
- * @param {Stream } info.stderr The apps STDERR stream
10
- * @param {object } pm2_env The apps environment variables
11
- * @returns {void }
12
- */
13
3
module . exports = function hook ( info , cb ) {
14
4
console . log ( 'hello-from-post-start-hook-' + info . pid ) ;
15
5
info . pm2_env . post_start_hook_info = {
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- /**
4
- * This is a post-start hook that will be called after an app started.
5
- * @param {object } info
6
- * @param {string } info.pid The apps PID
7
- * @param {object } info.stdin The apps STDIN stream
8
- * @param {object } info.stdout The apps STDOUT stream
9
- * @param {object } info.stderr The apps STDERR stream
10
- * @param {object } pm2_env The apps environment variables
11
- * @returns {void }
12
- */
13
3
module . exports = function hook ( info , cb ) {
14
4
throw new Error ( 'thrown-from-post-start-hook-' + info . pid ) ;
15
5
}
You can’t perform that action at this time.
0 commit comments