This web application serves a Single Page Application (SPA) through a web server while providing a REST API connected to PostgreSQL. It's built using Node.js and Express, following Clean Architecture principles, and integrates Mocha and Supertest for unit testing.
- Single Page Application (SPA): Delivers a frontend SPA through the web server.
- REST API: Provides endpoints connected to a PostgreSQL database.
- Clean Architecture: Organizes the codebase for maintainability and scalability.
- Node.js & Express: Utilizes Node.js with Express for the server setup.
- Mocha & Supertest: Implements comprehensive unit testing with Mocha and Supertest.
- Web Server: Serves the SPA as static files for client-side rendering.
- REST API Endpoints: Offers CRUD operations, interacting with a PostgreSQL database.
- Node.js & Express: Establishes the server setup and routing.
- Mocha & Supertest: Conducts unit tests to ensure API functionality.
- Clean Architecture Components: Separates business logic from data sources and external dependencies.
- Clone this repository:
git clone https://github.com/MosqueraSt3/restWeb.git - Configure the variables.
- Install dependencies:
npm install - Set up the PostgreSQL database and configure connection details in the app.
- Run the application:
npm start
- Run unit tests:
npm test
- Node.js & Express: Server-side framework for building web applications.
- PostgreSQL: Database management system.
- Mocha & Supertest: Testing frameworks for unit tests.
- Other dependencies: Check
package.jsonfor a complete list.
- src/: Contains the server-side code organized with Clean Architecture principles.
- public/: Holds the SPA files.
- tests/: Includes test suites for unit testing.