This project includes two main components: Algorithm and Backend/Node.
The FizzBuzz algorithm follows basic rules for displaying numbers:
- if number can be divided by 3: display Fizz ;
- if number can be divided by 5: display Buzz ;
- if number can be divided by 3 AND 5 : display FizzBuzz ;
- else: display the number.
In this version of FizzBuzz, you can easily edit or add as many rules as you want by modifying the rules
object in the algo.ts
file.
- Install dependencies:
npm install
- Compile the TypeScript file to JavaScript, then run the compiled JavaScript file with a number as argument :
tsc algo.ts
node algo.js [number]
Replace [number] with the desired input for the algorithm.
This application allows you to manage fleets of vehicles. It can:
- Create a fleet for a specific user.
- Register a vehicle to a fleet.
- Localize a vehicle by updating its location with latitude, longitude, and altitude (optional).
Install dependencies:
npm install
To run the tests:
npx tsc
npm test
To use the App:
chmod +x fleet
./fleet create <userId>
./fleet register-vehicle <fleetId> <vehiclePlateNumber>
./fleet localize-vehicle <fleetId> <vehiclePlateNumber> lat lng [alt]
This project uses GitHub Actions for Continuous Integration to automate the process of building, testing, and linting the codebase across multiple Node.js versions.
- Checkout Code: The code is checked out from the repository.
- Set Up Node.js: The workflow sets up different versions of Node.js (18.x, 20.x, and 22.x) for testing.
- Install Dependencies: Dependencies are installed using
npm ci
. - TypeScript Compilation: The TypeScript code is compiled with
npx tsc
. - Run Tests: Executes Gherkin-based tests to ensure functionality.
- Run ESLint: Checks code quality using ESLint.