I'm trying to make 52 projects this year. I'm mostly attempting this project to practise coming up with ideas. I'm not sure if it is even a skill someone can learn, but we will try it. It could also be a cool way to learn a few new tricks. I am thinking of making a weekly reel over on Instagram. What I am certain about is that all my projects will be posted on the Discord server, and I'm inviting you all to join in, post your projects, and see what we get up to. I'm hoping to blog about some of these projects, but I'm not sure that all the projects will be big enough for a dev log. I'm thinking I will wait until I have a few and write about them together. Your opinions and advice would be welcomed here. I'm sure they will go somewhere on my website even if I add a new page for this.
So, my first project was a web project where I used JS Canvas. I forgot this existed; I used it once before, six years ago, at school. I also learnt how to use Node.js, both for hosting and to automate a small task I was too lazy to do by hand. So, what is my first project? A simple meme maker: https://memes.michaelrbparker.com/. My JS is all alright, but I didn't know a way to get all the images without Node. I ended up creating an API endpoint with a list of all image files. Then it will randomly select one. If there's not a template you like, there's an option to upload your own image. After that, it's as simple as using JS Canvas to make the image. Overall, this all took maybe two hours. The bigger issue was Nginx. I think the only people who know how Nginx works are Igor Sysoev (the creator) and God. Sometimes I question whether Igor fully knows how to use it. Initially, my images were being hidden away, so I modified my config by adding:
location /media/ { root /home/user/app; }
This fixed it for about a day. A day later, the website was 404ing when trying to locate an image. I removed the location bit, and it started working again. Nginx will always be a mysterious thing. So here is the code: https://github.com/micfun123/Meme-Generator. I don't think I have any more to say. I hope you join me on my challenge. I look forward to seeing what you all make.
Top comments (1)
all the best