Skip to content

Commit b5046c2

Browse files
committed
initial commit
1 parent 08ced42 commit b5046c2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# crashr
2-
A Node.js script that immediately exits with a non-zero exit code, simulating a crashing container.
2+
3+
A Node.js script that immediately exits with a non-zero exit code, simulating a crashing container. Useful for testing and debugging in [Docker](https://www.docker.com) and [Kubernetes](https://kubernetes.io) environments.

src/app.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
const datetime = new Date().toISOString();
4+
const EXIT_CODE = 3;
5+
6+
console.error(`${datetime} - Crashing now... Goodbye cruel world!`);
7+
process.exit(EXIT_CODE);

0 commit comments

Comments
 (0)