This is a Node.js application built using TypeScript that serves as a chat assistant. It integrates with a chat service and utilizes the OpenAI API to provide responses to messages.
Before running the application, ensure you have the following prerequisites installed on your system:
- Node.js (version 18 and above)
- Docker: Install Docker to run containers.
To run the database for this application locally, you can use Docker Compose with the provided docker-compose-db.yml
file.
Follow these steps to start the database using Docker Compose:
-
Navigate to the Project Directory:
Open your terminal and navigate to the root directory of your project where the
docker-compose-db.yml
file is located. -
Start the Database Containers:
Run the following command to start the database containers defined in the
docker-compose-db.yml
file:docker-compose -f docker-compose-db.yml up -d
Follow these steps to get the application up and running locally.
-
Install project dependencies:
npm install
-
Configure Environment Variables: Create a
.env
file based on.env.test
file in the root directory of the project and set the environment variables according to your configuration. -
Start the Application: Build & Run the Node.js application:
npm run build npm start
You can run tests for the application using the following command:
npm test