NguyenVanViet2004 / FE-GlowUp

The frontend for the GlowUp application, developed using React Native and Expo. This project delivers the client-side interface and user experience for the GlowUp app, including components for user interaction, styling, and integration with backend services
0 stars 3 forks source link

Configure axios for api usage #17

Closed thanhdo29 closed 1 month ago

thanhdo29 commented 1 month ago

Related issues

Resolve #7

Summary

Create method HTTP

How to test

Data:

{
    "vouchers": [
      {
        "_id": "1",
        "name": "New Year Sale",
        "percent": 20,
        "expirationDate": "2024-12-31T23:59:59.000Z",
        "isActive": true
      },
      {
        "_id": "2",
        "name": "Black Friday",
        "percent": 50,
        "expirationDate": "2024-11-30T23:59:59.000Z",
        "isActive": true
      },
      {
        "_id": "3",
        "name": "Summer Discount",
        "percent": 15,
        "expirationDate": "2024-06-30T23:59:59.000Z",
        "isActive": false
      }
    ]
  }

Step 1: Create file db.json and put data into file Step 2: Run file db.json with IPv4 Step 3: Open file HTTPClient.ts and replace BASE_URL with IPv4 Step 4: Run app Step 4: Check terminal

Concern points

Screenshots

truongtdph40209 commented 1 month ago

Good, configuration no problem image