Weekly Notes 005 - Building APIs with NodeJS, Open source and AWS

Hey, and welcome to my weekly review. I hope you find something useful from my experience this past week.

  • One of my biggest accomplishments for this week was closing out all the issues on next-starter-peacock. It made me think deeply about how long it takes for a project, product, or skill to be decent. I built next-starter-peacock in 2 days as my personal site. I decided to open-source it and since then, I've been gradually adding features and finding ways to make it better.

  • So my newest project is WhereAPI - which is an API service to solve location-related problems for African developers. This project scares the hell out of me. As a frontend developer, I literally started learning NodeJS last month and it feels like I know nothing about backend development. But this also feels like a good opportunity to expand my horizons and dip my legs into new territories. I'm planning a V1 by the end of March and I've kept this Trello board public to keep myself accountable.

  • After a few days of development, I switched to a relational database for where API (from Mongo). I ended up with PostgreSQL and Prisma after lots of research. Prisma is an ORM for modern Javascript projects. Before going with Prisma, I considered

  • I felt frightened by Sequelize after reading their documentation. But Prisma quickly ran right into my heart. Majorly because of how approachable the docs were, plus the migrations were quite straightforward. I'm currently enjoying every bit of this setup.

  • Now going to the worst part of my week. I spent a huge part of my week deploying a Nodejs API to AWS. This was very frustrating. I have this app already hosted on Heroku alongside a PostgreSQL database (with Prisma), but I thought it would be a good idea to move the compute to an EC2 instance and the database to Amazon's RDS postgreSQL.

It Wasn't

  • I started with setting up the EC2 instance. Everything was going fine, till I had to SSH into the instance to set up a basic node, etc. This took me 2 solid days. The connection kept timing out. I really don't want to go into much technical detail in this post, but it wasn't a funny one. I tried opening all ports, resetting security groups, virtually everything. I gave up and decided to try AWS Elastic beanstalk, which is a service that sets up everything (S3, EC2, database, load balancers, scaling etc) you need to host your app. I successfully linked the project's repository to an AWS Codepipeline for the CD.

  • Then I got another issue because the app was written in Typescript and had to be compiled first. No problem, I looked into elasticbean configuration files and made one to compile Typescript immediately after installing dependencies. For a full day, this didn't work. I closed all my AWS browser tabs out of frustration, How is something of this scale so hard to deal with? I really don't know if I'd want to try AWS ever in my career 😂

Podcasts

  • Interview with Segun Adebayo: Chakra UI, Open Source, Life - Sage and Gift discuss about Open source. Sage is the creator of Chakra-UI and Gift is a frontend engineer I'm learning a lot from. Here're takeaways from this podcast

    1. Genuinely follow your interests and take calculated risks. There's really nothing to lose.
    2. It takes time to build something useful and successful.
  • How I stay productive all day - I really love Matt D'Avella videos. This is one of the best a day in a lives I've seen,

  • PHP with Zeev Suraski - Zeev was an early contributor to the language (Wrote a huge part of PHP 2). They talk about why PHP is considered insecure by most people's standards. I think one learning here for me is the idea of first impressions. PHP is a quite decent language, if not 40% of the web wouldn't be running it. I tried PHP 7 in 2019 and it wasn't that bad. Somehow, people just have an impression and no matter how hard people try to make the language better, they'll always be that level of doubt about what the language can do.

Stuff I'm reading

I didn't read much this past week. I guess I was too busy with AWS 😂

Resources

  • Radix (Github) - Radix Primitives is a low-level UI component library with a focus on accessibility, customization and developer experience.
  • Udacity Scholarships - First 150 Blacks In Technology 2021 Scholarships Announced

Music

I've been listening to Somewhere Between Beauty & Magic lately. I think Joeboy's album is very much underrated. My favorite songs on the are OH and Sugar Mama. And I must not forget to mention my love for SZA. I've been enjoying Good Days and Hit Different. Men, I can go all day with these songs.

That'll be all for this week. See you next week 👋