Coder Social home page Coder Social logo

axios's Introduction

Mini Project: Dynamic Data Display

This is a mini project that demonstrates how to use the Axios library to retrieve data from a JSON server and dynamically display it on a web page. The project consists of HTML, JavaScript, and a sample JSON database.

Prerequisites

Ensure you have a JSON server installed. You can use json-server or a similar tool to serve the db.json file. You can start the JSON server by running the following command: npx json-server db.json

Project Components

JSON Database

The db.json file serves as a simulated database with a list of people. Each person in the database has attributes such as name, surname, sex, age, and a URL to their photo.

JavaScript

The script.js file contains JavaScript code that listens for a button click. When the button is clicked, it asynchronously fetches data from the JSON server using the Axios, processes the data, and dynamically creates HTML elements to display each person's information on the web page.

Usage

  1. Clone or download this repository to your local machine.
  2. Start the JSON server using npx json-server db.json.
  3. Open the index.html file in a web browser or use a development environment like Live Server to run the project.
  4. Click the "Click" button, and the information of the people from the JSON database will be fetched and displayed on the web page.

axios's People

Contributors

eduard7mar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.