diff --git a/first-app/src/environments.ts b/first-app/src/environments.ts new file mode 100644 index 0000000..5185815 --- /dev/null +++ b/first-app/src/environments.ts @@ -0,0 +1,3 @@ +export const Environments = { + URLApi: "" +} \ No newline at end of file diff --git a/first-app/src/services/ClienteService.ts b/first-app/src/services/ClienteService.ts new file mode 100644 index 0000000..c442144 --- /dev/null +++ b/first-app/src/services/ClienteService.ts @@ -0,0 +1,17 @@ +import { Environments } from "../environments" + +const {URLApi} = Environments; + +const findPaises = async () => { + + const data = await fetch(`${URLApi}/paises/list`) + .then((res)=>res.json()) + .catch((err)=>err); + + return data; + +} + +export const ClienteServices = { + findPaises +} \ No newline at end of file