/QuadB

Primary LanguageJavaScript

QuadB Node.js Assignment

🚀 This project represents the Node.js assignment for QuadB, aiming to fetch and display the top 10 cryptocurrency results from the Wazirx API. The web application meets the specified requirements outlined in the assignment.


Features

  • 📊 Fetches and displays the top 10 cryptocurrency results from the Wazirx API.
  • 🔄 Utilizes PostgreSQL for efficient caching and storage of cryptocurrency data including name, last price, buy price, sell price, volume, and base unit.

Tech Stack

Frontend

  • 🌐 React
  • 🔧 Bootstrap

Backend

  • 🚀 Node.js
  • 🌐 Express.js
  • 💻 JavaScript
  • 🐘 PostgreSQL

Local Setup

Client

  1. Navigate to the client directory:

    cd client
  2. Install dependencies:

    npm install
  3. Start the client:

    npm run start

Server

Configuration

Before running the application, make sure to set up your environment variables. Create a .env file in the server directory and add the following configurations:

# PostgreSQL Database Configuration
PGUSER=postgres
PGHOST=localhost
PGDATABASE=wazirx
PGPASSWORD=vikas
PGPORT=5432

# Application Port
PORT=5000
  1. Navigate to the server directory:

    cd server
  2. Install dependencies:

    npm install
  3. Start the server:

    npm run start
    # or for development
    npm run dev

Images

Here are some screenshots for your reference:

Web Page

Server Snippet Server Snippet Server Snippet

Express Route for Retrieving Data

Server Snippet

Assignment Fulfillment

✅ The assignment requirements have been successfully implemented:

  • The webpage is designed to be nearly identical to the provided link.
  • The top 10 results from the Wazirx API are fetched and stored in a PostgreSQL database