codefly-dev / landing

https://codefly-landing.vercel.app
0 stars 0 forks source link

Next.js + Auth0 Demo Requirements #7

Open AntoineToussaint opened 10 months ago

AntoineToussaint commented 10 months ago

To show the power of using codefly, I need to show how quickly I can a component that ping an API from another service.

  1. Need a JSON Display component that takes a URL, fetch the data and display it Two versions for the HTTP call

    • [ ] regular HTTP call
    • [ ] Auth0 wrapper with Token
  2. Need a small library that will read from environment variables that will be passed to npm run dev that we can use to get the proper URL (we don't want to hardcode it)

CODEFLY-ENDPOINT_IAM/PEOPLE::REST=localhost:11408

Final workflow

in the main page

I want to add two components / pseudo code

<Protected(JSONDisplay) url=codefly.Endpoint("iam/people").Get("/version") />

<JSONDisplay url=codefly.Endpoint("iam/people").Get("/version") />

I will add the API Gateway

This will give us a new environment variable:

CODEFLY-ENDPOINT_WEB/API::REST=localhost:11401
<Protected(JSONDisplay) url=codefly.Endpoint("web/api").Get("/iam/people/version") />

<JSONDisplay url=codefly.Endpoint("web/api").Get("/iam/people/version"/>
AntoineToussaint commented 10 months ago

{"version":"0.0.0"}