The ForwardJS Raffle is a Node.js-based application designed to randomly select a winner from a list of participants. It uses a text file containing participant names and provides a fun, animated selection process to determine the winner.
- Clone the repository or download the source code.
- Navigate to the project directory:
cd forwardjs-raffle
- Install the required dependencies:
npm install
- Prepare a text file (e.g.,
names.txt
) with one participant name per line. - Run the raffle script with the file path as an argument:
node raffle.js names.txt [number-of-winners]
- The
number-of-winners
parameter is optional and defaults to 1 - Example for multiple winners:
node raffle.js names.txt 3
- The
- Follow the on-screen instructions to start the raffle and see the winner(s).
Alice
Bob
Charlie
Diana
For a single winner:
π WINNER π
Charlie
Congratulations to the winner of the JetBrains subscription!
For multiple winners (e.g., 3 winners):
π WINNERS (3) π
Alice
Bob
Charlie
Congratulations to the 3 winners of the JetBrains subscriptions!