X button icon

Jasmine Nackash is a multidisciplinary designer and developer intereseted in creating unique and innovative experiences.

Week #08

Microservices

I still have a problem where I can't really get my files to any url other than http://www.jn.jnackash.com:8080 (only http, only with "www", and only with the port number). Any other way doesn't seem to work and I can't figure out why. Some give 301, some 404, and some 502.

So let's try to break it down to parts:

  1. The nginx setup did go successfully a couple of weeks ago and I did manage to see my little HTML scribble up in all variations of the url. Therefore (and also because I double checked), I think the issue is not with the server block.
  2. I verified that the SSL certificate is correct, although it doesn't really make sense for this to be the issue, as the HTTP address without "www" doesn't work either.
  3. I suspect the issue lies in either the files I'm serving (a code problem), or where they are located in terms of the directory.

I replaced the server.js file — I was using the example from Glitch, and now I'm using the example from class. Still no change. I thought the issue is therefore with how it's serving files — where they are located in my directories. I asked Matthew and Zongze for help and compared what I had with them — seemed like my suspicions were correct! I originally initiated node and created the associated files inside of my user folder that's inside of /var/www/[my-domain], when I should've done it in /home/[my-username]. So I moved the files and updated the server block configuration. At this point it should've worked but it still didn't — it was still giving a 404 error when I tried accessing my web address. I had to remove the line try_files $uri $uri/ =404; from the sites-available file and only then it worked. But I don't understand why this is the case! I tried adding it again after it seemed to work and the problem came back again. That said, this doesn't mean that this is the actual issue — removing this line might have treated the symptom but not the underlying cause so I'd still like to fix it. At least now I can successfully upload my code to my server.

I didn't have much time left to come up with something new, but I wanted to upload a recent small sketch I made that uses firebase for its realtime database capabilities. I had to make some adjustments and split some of the code between the server side and the client side, but this sort of completes it now that I can reliably run it on my node server without having to expose my API keys in the client side.

This idea comes down to exploring how we make decisions, but I wanted to start with something simpler — just exploring an interaction where a "thing" is created in a semi-democratic way based on people's choices. It's a grid of cells, where each cell can be either black or white, and the way it's decided is dependent on how many times it has been black or white before (or: how many people before you have chosen to make it this or that). This happens for each cell each time a session starts, but it happens at the cell level and not the grid level so you almost always get something new that is this semi-democratic combination of other people's choices. So inadvertently, piece by piece, we all end up contributing to an "agreed" object.

Please do feel free to contribute to the consensus as well! If you refresh and don't see the cells change that's because many cells already have high persistence, but you can try and change that!

Scripts can be found on my github repo.