Exchange Monitor is a web application for monitoring the USD to UAH exchange rate. The application also allows users to subscribe to rate updates via email.
-
Node.js: Ensure you have Node.js installed. You can download it from nodejs.org.
-
MongoDB: Make sure MongoDB is installed and running on your local machine or accessible via a URI. You can download MongoDB from mongodb.com.
-
Docker (optional): If you prefer using Docker, ensure Docker and Docker Compose are installed. You can download Docker from docker.com.
-
Clone the repository: git clone https://github.com/taniaomelko/exchange-monitor.git cd exchange-monitor
-
Install dependencies: npm install
- Use a
.env.example
file to create.env
in the root directory of the project. Replace the placeholders for email and password with your actual values: EMAIL: Replace [email protected] with your actual email address. EMAIL_PASSWORD: Replace your-email-password with your actual email password.
-
Start MongoDB.
-
Start the application in development mode: npm run dev
-
Start the application in production mode: npm start
Migrations are automatically applied when the server starts. This ensures that your database schema is always up to date.
If you prefer to use Docker for running the application, follow these steps:
-
Ensure Docker and Docker Compose are installed on your machine. You can download Docker from docker.com.
-
Build the Docker containers: docker-compose build
-
Start the Docker containers: docker-compose up
-
Stop the Docker containers: docker-compose down
Using Docker simplifies the setup process by containerizing the application and its dependencies, making it easier to manage and deploy.