This is a Node.js program that extracts data from multiple sources and stores it in a PostgreSQL database.
-
Clone the repository:
git clone https://github.com/grxkun/parser-multi-app.git
-
Navigate to the project directory:
cd parser-multi-app
-
Install dependencies:
npm install
Before running the program, make sure to configure the PostgreSQL connection settings in the parser-multi-app.js
file:
const pool = new Pool({
user: 'your_username',
host: 'localhost',
database: 'your_database',
password: 'your_password',
port: 5432,
});
Replace 'your_username'
, 'your_database'
, and 'your_password'
with your actual PostgreSQL credentials.
Run the program using Node.js:
node parser-multi-app.js
The program will extract data from two different sources (a website and a REST API in this example) and store it in the configured PostgreSQL database.
- Extract Data from Multiple Sources: This program demonstrates extracting data from different sources such as websites and REST APIs.
-
Store Data in PostgreSQL Database: Extracted data is stored in a PostgreSQL database using the
pg
module. - Error Handling: The program includes error handling for data extraction and database operations.
Contributions are welcome! Please feel free to submit pull requests or open issues for any improvements or suggestions.
This project is licensed under the MIT License - see the LICENSE file for details.