This project is a Node.js application written in TypeScript that sends birthday greetings to employees. It demonstrates the use of TypeScript with Node.js, including environment variables, email sending functionality, and file-based data storage.
- Handles sending birthday greetings via email.
- Reads employee data from a file.
- Configurable with environment variables for email credentials.
Make sure you have the following installed:
-
Clone the Repository
git clone https://github.com/roykallaye/the-birthday-greetings-kata.git
-
Navigate to the Project Directory
cd the-birthday-greetings-kata
- Install Dependencies
npm install
- Create a .env File
Create a .env file in the root directory of the project and add your environment variables. For example:
[email protected]
PASSWORD=your-email-password (Gmail app password, to be generated first)
- Run the Application
npm start
This command will start your application. Ensure your package.json has a start script defined.
- Run Tests
npm test
This will execute your test suite using Jest.
- Project Structure
src/: Contains the source TypeScript files.
dist/: Compiled JavaScript files (generated after building the project).
test/: Test files.
.env: Environment variables file.
package.json: Project metadata and dependencies.
tsconfig.json: TypeScript configuration file.
README.md: This file.
- Contributing
If you'd like to contribute to this project, please fork the repository and submit a pull request with your changes.