This folder contains examples of applications that demonstrate how to interact with a PostgreSQL database using Express.js. These examples showcase different use cases, such as managing library book records, handling product inventory, and managing user accounts.
- Description: A web application that allows users to manage library book records stored in a PostgreSQL database. Users can add, view, update, and delete book records through a web interface.
- How to Run:
- Navigate to the
library-book-managementfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Description: A web application that allows users to manage product inventory stored in a PostgreSQL database. Users can add, view, update, and delete product records through a web interface.
- How to Run:
- Navigate to the
product-inventoryfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Description: A web application that allows users to manage user accounts stored in a PostgreSQL database. Users can add, view, update, and delete user records through a web interface.
- How to Run:
- Navigate to the
user-managementfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Node.js installed on your machine.
- A running PostgreSQL database instance.
- Update the database connection settings in each app's
index.jsfile to match your PostgreSQL configuration.
- These examples use the
pglibrary to interact with PostgreSQL. - Ensure your PostgreSQL database is running and accessible before starting the applications.
- Example SQL scripts for creating the necessary tables may be included in the respective folders.
- Static assets (e.g., CSS) are located in the
publicfolder of each app.