File tree Expand file tree Collapse file tree 4 files changed +1
-31
lines changed
examples/post-start-secret-delivery
test/fixtures/post_start_hook Expand file tree Collapse file tree 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;
44/**
55 * This is a post-start hook that will be called after an app started.
66 * @param {object } info
7- * @param {string } info.pid The apps PID
7+ * @param {number } info.pid The apps PID
88 * @param {Stream } info.stdin The apps STDIN stream
99 * @param {Stream } info.stdout The apps STDOUT stream
1010 * @param {Stream } info.stderr The apps STDERR stream
Original file line number Diff line number Diff line change 11'use strict' ;
22
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- */
133module . exports = function hook ( info , cb ) {
144 cb ( new Error ( 'error-from-post-start-hook-' + info . pid ) ) ;
155}
Original file line number Diff line number Diff line change 11'use strict' ;
22
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- */
133module . exports = function hook ( info , cb ) {
144 console . log ( 'hello-from-post-start-hook-' + info . pid ) ;
155 info . pm2_env . post_start_hook_info = {
Original file line number Diff line number Diff line change 11'use strict' ;
22
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- */
133module . exports = function hook ( info , cb ) {
144 throw new Error ( 'thrown-from-post-start-hook-' + info . pid ) ;
155}
You can’t perform that action at this time.
0 commit comments