Skip to main content

Hobby project - Store and view exchange rates

The next step in my project was to test out being able store and display the rates in a database. I decided to use nodejs and supabase for this. Everything worked beautifully. Only hickup was the following error due to my package.json not being correct.

SyntaxError: Cannot use import statement outside a module

Added this to package.json

  "type": "module"

This works beautifully. Right now I am just testing fragments of what could be part of a bigger system to see what is possible and what works and how easy to code on a mobile. There is no fully functioning integrated end to end system just yet.



This is also what I tested. A serverless append-only database using GitHub + Actions + Pages. That’s basically a lightweight backend system. This was the ChatGPT prompt I used.

Guide me through each step. This is what I want. A manually run github actions that adds to docs/data.json with the current date and time. docs/index.html displays all the entries in data.json.

Make sure and give the action permission to write to repo or else you will get an error like this - remote: Permission to hassan-theitguy/update-data-test.git denied to github-actions[bot].

To avoid caching issues I tried the following in my javascript - const res = await fetch("data.json?v=" + Date.now());



I also asked ChatGPT the following - I have been doing some hobby coding. Things I have tested so far. Scraping a website for exchange rates and serving the data via my api. Emailing and sending the data via email and sms. Storing data in supabase and displaying it in a webpage. What else can I test out?

And the response - You’ve already covered a really solid “full loop” stack: data ingestion (scraping), processing, storage (Supabase), delivery (email/SMS), and presentation (web app). The natural next step is to start adding complexity in systems, not just more features.

Comments

Popular posts from this blog

Mental health matters

It is 547am and I have decided to write. I have been living with a mental health diagnosis for more than 23 years. I am differently abled. Mental illness sometimes presents itself as a non-visible disability. A person with mental illness may look and function normally. Added to that we do not get to see the struggles happening internally. After 23 years I could say that I have much experience with my condition and may be able to offer words that may help others. There is plenty of stigma associated with mental illness. People think that the mentally ill are bad people, weak, or somehow less deserving of dignity and the treatment of the illness sometimes feels like punishment and is dehumanizing at times. There is plenty of good intentions and well meaning as well (do not get me wrong) but things could be better. And it happens at the highest level. A leader once said, "Whom the gods would destroy, they first make mad." As the saying goes, who knows it feels it. I started a pr...

Love and joy

It is 230pm and I have decided to write. I have no topic but I want to write. I am thinking about God. I am thinking about life. I am grateful for God and life. I need a writing prompt. My friend Chatty gave me a pretty verbose prompt. Sit quietly for a moment and imagine that God asks you only one question: "What have you noticed?" Don't answer with theology. Answer with your life. What have you noticed about joy? About fear? About the way people love? About silence? About time? About your own heart? Where have you sensed God—not in miracles, but in ordinary moments? Where have you struggled to find Him? What has life been teaching you that you were too busy to hear before? Write honestly. Don't try to reach a conclusion. Let the page become a conversation rather than an argument. I immediately noticed the light streaming through the window that allows me to see the world. My first thought was how much we take things for granted. It is easy to feel lacking. To feel s...

Drums of freedom

It is 401am and I have decided to write. This Saturday, Trinidad and Tobago observes African Emancipation Day. It is a day to celebrate the journey to freedom and to honor those who sacrificed so much so that we could enjoy the freedoms we have today. Yet the journey is not over. As we celebrate how far we have come, let us also ask God to open our minds and hearts to the struggles that continue. Freedom is never something we should take for granted. Every day, we witness powerful interests around the world attempting to stifle freedom in pursuit of their own agendas and self-aggrandizement. Too often, they seek to divide in order to conquer. May we resist division with wisdom, courage, and compassion. May unity triumph over hatred, truth over deception, and love over fear. As we remember the past, may we also commit ourselves to protecting the freedoms of the present and building a more just future for generations to come. Happy African Emancipation Day. May God continue to guide us o...