Mina-Sayed / user-insights-backend-Nexus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

user-insights-backend-Nexus

User Insights Web Application

This is a web application that provides insights into user data. It consists of a Node.js backend service and a simple frontend.

Prerequisites

Docker installed on your machine

Getting Started

To run the web application, follow these steps:

  1. Clone this repository to your local machine:

    git clone git@github.com:Mina-Sayed/user-insights-backend-Nexus.git
  2. Navigate to the project directory:

    cd user-insights-backend-Nexus
  3. Build the Docker images for both the backend and frontend:

    docker-compose build
  4. Run the Docker containers for both the backend and frontend:

    docker-compose up -d

The web application should now be running. You can access it at http://localhost.

Backend API Endpoint

The backend service provides the following API endpoint:

GET /api/users: Fetches user data with optional filters for name and active status.

Example Usage:

  • Fetch all users:

    curl http://localhost/api/users
  • Fetch users with a specific name (e.g., "John"):

    curl http://localhost/api/users?name=John
  • Fetch active users:

    curl http://localhost/api/users?active=true

About

License:MIT License


Languages

Language:JavaScript 67.1%Language:HTML 28.2%Language:Dockerfile 4.7%