HIVE Developer Problems? Problemas desarrollando en HIVE Backend 2/3 ENG/SPA
hive·@theghost1980·
0.000 HBDHIVE Developer Problems? Problemas desarrollando en HIVE Backend 2/3 ENG/SPA
 SPA ------ Saludos *Hivers*. Por acá empezaremos a ser más conscisos y precisos en cuanto al contenido. Ya me lo había dicho un profesor una vez en un examen: > Mucha paja y poca grama! Quería decir que había colocado muchas cosas en mi exámen pero nada era denso como para sacar una buena nota. #### Problemas desarrollando en HIVE? Siempre haré incapié en los puntos siguientes: - Recuerda que la web3 está en desarrollo constante. Ya sea que hagas artículos o esrcibas código, debes tener claro que esto lo estamos haciendo cada día tú y yo. - Busca ayuda con desarrolladores experimentados en los canales oficiales de discord: - [Hive](https://discord.gg/cgZbmhBbw7) - [Engine](https://discord.gg/t3Cg3w4nr4) - [Peakd](https://discord.gg/6FEgSx56rF) > Importante: Nunca te rindas y pregunta aunque puedas parecer una persona molesta. Todos están muy ocupados pero siempre habrá un alma noble dispuesto a ayudarte - Siempre entra en la documentación oficial para los desarrolladores. [Hive Developers](https://developers.hive.io/) ----- #### Desarrollando un Indíce para las Piscinas de Liquidez Como lo he comentado en artículos anteriores, estoy llevando a cabo una superpocisión de datos de la capa 2 de HIVE. Actualmente se están llevando a cabo *pools de liquidez* que son tokens bloqueados para tener monedas líquidas y hacer operaciones de SWAP o Trading. Entonces cada día se generan operaciones que a su vez, generan comisiones(Fees) y estas son distribuidas entre quienes tienen posiciones. > La idea del indice es poder accceder a la data de manera fija y tener dicha data nueva cada 24 horas. - Acá puedes mirar [el código](https://github.com/theghost1980/hive-liquidity-pools-data-index) de lo que estoy probando y codificando. - Acá [puedes mirar](https://hive-liquidity-pools-data-index.onrender.com/) el backend corriendo. - Y acá puedes mirar [la data servida](https://hive-liquidity-pools-data-index.onrender.com/data/). Recuerda que cada archivo .json representa 1 dia de datos. #### Como puedo subir un backend gratuitamente para probarlo? Puedes hacerlo de la misma manera en que estoy corriendo este. 1. Navega a [Render.com](https://render.com/) crea tu cuenta. 2. Enlaza tu repositorio y tu cuenta de github(supongo que ya sabes que para controlar las versiones y el código debes usar github). Ojo: Concede acceso solo al repositorio del backend que quieres probar. 3. Sube el codigo y NO OLVIDES: modificar los comandos de *build, start*  > Por último, corre tu backend y prueba. #### Aparecerá un problema, pero tranquilo tengo tu solución! Te darás cuenta que muchas de las opciones que tenemos para subir y probar un backend, nos limitan de muchas maneras para obligarnos a comprar. Por ejemplo en Render.com si tu servidor **no recibe una petición en una rango de tiempo de 15 minutos** se volverá inactivo y eso **no nos sirve para nada** - Antes de que te compliques codificando una auto-petición dentro del backend, etc etc. - Utiliza el servicio **gratuito de https://cron-job.org/en/** #### El problema? La solución! Mi problema es que debo mantener ese servidor activo las 24h porque **estoy tomando data cada 24 horas** pero el bendito render.com me limita a 15 minutos.  #### [Cron-job.org](https://cron-job.org/en/) Es una plataforma genial creada por un grupo de Angeles del codigo. Esta app nos permite emitir eventos y peticiones a sitios web en un base de tiempo programada. Así que al conocer esto, simplemente configuré una request al siguiente ENDPOINT: https://hive-liquidity-pools-data-index.onrender.com/status Y la he configurado para que se ejecute automaticamente cada 10 minutos.  #### HIVE Soluciones para los que hagan backend y deseen probar Usando esta herramienta puedes mantener un servidor activo, las 24h. Y eso es genial antes de **comprar una subscripción o estar pagando dinero sin haber probado** > Y Voilá tenemos el cron-job andando y el servidor en modo testing pero funcionando perfectamente  #### Proximos pasos en este Index? 1. Añadir endpoint para obtener fees, data, volumen por: - piscina de liquidez - posicion de usuario(si posee) - top 10 de posiciones con resumen de ganancias aproximado ------ ENG: Greetings *Hivers*. This way we will start to be more concise and precise in terms of content. A professor once told me in an exam: > A lot of chaff and not much grass! He meant that I had put a lot of things in my exam but nothing was dense enough to get a good grade. #### Problems developing in HIVE? I will always emphasize the following points: - Remember that web3 is in constant development. Whether you are making articles or writing code, you must be clear that this is what you and I are doing every day. - Seek help from experienced developers on the official discord channels: - [Hive](https://discord.gg/cgZbmhBbw7) - [Engine](https://discord.gg/t3Cg3w4nr4) - [Peakd](https://discord.gg/6FEgSx56rF) > Important: Never give up and ask even if you may seem like an annoying person. Everyone is very busy but there will always be a noble soul willing to help you - Always go into the official documentation for developers. [Hive Developers](https://developers.hive.io/) ----- #### Developing an Index for Liquidity Pools As I have discussed in previous posts, I am conducting an HIVE layer 2 data overlay. Currently there are *liquidity pools* being conducted which are locked tokens to hold liquid currencies and do SWAP or Trading operations. So every day operations are generated which in turn, generate commissions (Fees) and these are distributed among those who have positions. > The idea of the index is to be able to access the data in a fixed way and have new data every 24 hours. - Here you can see [the code](https://github.com/theghost1980/hive-liquidity-pools-data-index) of what I am testing and coding. - Here [you can see](https://hive-liquidity-pools-data-index.onrender.com/) the backend running. - And here you can see [the data served](https://hive-liquidity-pools-data-index.onrender.com/data/). Remember that each .json file represents 1 day of data. #### How can I upload a backend for free to test it? You can do it the same way I am running this one. 1. Navigate to [Render.com](https://render.com/) create your account. 2. Link your repository and your github account (I guess you already know that for version control and code control you must use github). Note: Grant access only to the repository of the backend you want to test. 3. Upload the code and DON'T FORGET: modify the *build, start* commands. > Finally, run your backend and test. #### A problem will appear, but don't worry, I have your solution! You will notice that many of the options we have to upload and test a backend, limit us in many ways to force us to buy. For example at Render.com if your server **doesn't receive a request within 15 minutes** it will become inactive and that **doesn't do us any good** - Before you go to the trouble of coding an auto-request into the backend, etc etc etc. - Use the **free service from https://cron-job.org/en/** #### The problem? The solution! My problem is that I have to keep that server active 24h because **I am taking data every 24 hours** but the blessed render.com limits me to 15 minutes.  #### [Cron-job.org](https://cron-job.org/en/) It's a cool platform created by a group of coding angels. This app allows us to issue events and requests to websites on a scheduled time base. So knowing this, I simply set up a request to the following ENDPOINT: https://hive-liquidity-pools-data-index.onrender.com/status And I set it to run automatically every 10 minutes.  #### HIVE Solutions for those who do backend and want to test Using this tool you can keep a server up, 24h. And that's great before **buying a subscription or paying money without testing** > And Voila we have the cron-job running and the server in testing mode but working perfectly. #### Next steps in this Index? 1. Add endpoint to get fees, data, volume by: - liquidity pool - user position(if any) - top 10 positions with approximate profit summary
👍 gmlgang, ecoinstant, investegg, voter001, fatman, votehero, voter000, tomiscurious, cryptoknight12, jozefkrichards, kernelillo, dpend.active, sketching, mxm0unite, misticogama, galaxiavtuber, mv-curacion, freed99, cryptoferyel, pleo1542, nahueldare3627, s3rg4, chechostreet, alicia2022, hk-curation, gornat, midnight-studio, hashkings, summertooth, marsupia, juansitosaiyayin, rondonshneezy, sbi5, sbi-tokens, thedailysneak, meanbees, daddydog, txracer, ecoinstats, thecrazygm, synergized, treasure.hoard, thecrazygm.bank, abrockman, mithrildestiny, everythingsmgirl, ecosaint, ecobanker, archon-gov, irisworld, moserich, prize.hoard, monsterrerentals, ykretz, afroadrianv, bbarelyseal, untaljames, jennylu, autinf, omra-sky, meno, magic.byte, eddiespino, steemulant, pocketjs, steemtelly, edicted, iansart, anacristinasilva, anonsteve, hextech, ykroys, eforucom, gaottantacinque, cribbio, gasaeightyfive, keys-defender, cryptoshots.nft, marcocasario, karina.gpt, hive-defender, key-defender.shh, crypto-shots, cryptoshots.play, cryptoshotsdoom, artlover, balvinder294, filoriologo, bonzopoe, tehox, glowshine, mes, lrekt01, likedeeler, rochow,