comment 0

Cold Days

Education will never be cheaper while you study (at least in switzerland). This is why I took a photography course at my university (and also to earn cheap credits). The course was mostly about art and history, but nonetheless very interesting. Below, you’ll find my favorite photos.

I liked how the rain covered the handle.


Read More

comments 6

Reactive subscriptions with Apollo and React

Apollo server and client support real-time subscriptions with web sockets. Compared to Meteor’s out of the box real-time communication this is a lot more difficult to set up. With this short tutorial I’ll give you an example of how you can get a simple reactive subscriptions into your Apollo/React app. The idea is that you use real-time communication for a specific case only, f.g. sending notifications. We will accomplish this in five steps.

  1. Install project requirements.
  2. Setup the server schema.
  3. Add server resolvers.
  4. Setup the client subscription.
  5. Modify a component to receive data from a subscription.
    Read More
comment 0

California and Costa Rica

During the last seven weeks I’ve spent a lot of time in California. With my study class we worked on projects with local companies in the Silicon Valley. It was a great experience. For the weekends I had decided to visit Yosemite and the beautiful lake Tahoe again. Despite the Californian drought I had some good hikes there. Before leaving for home I took a flight to Costa Rica and spent a week there. Seeing the caribbean coast not on a post card was a very nice thing. Now here are some pictures you might like:

Public transport in America is hard to endure as a swiss.

Public transport in America is hard to endure as a swiss.

Read More

comment 0

Graphql with Apollo, Meteor and React

For my last project I had to build a web application to administrate a MongoDB database. Due to using Meteor quite a lot I heard about Graphql and the Apollostack. Graphql, which is a specification done by Facebook engineers, promises to be the better REST API (which I hope it is). I became curious and decided the build the server API with Apollo. First I tried to evade using the Meteor as build system as I don’t want to get too accustomed to this full-stack ecosystem. However, building a live-reload server and client build system in ES6 with Node.js, Babel and Webpack was simply too much work compared to building this simple web app. So in result this was my stack:
Read More

comment 0

Node.js dynamic settings

As I’m relatively new to Node I had to wrap my head around a very basic thing. Getting external variables into my app. Loading settings for different environments from config files and via environment variables (for heroku deployment) should supposedly be an easy challenge. However, none of the solutions I’ve found were well enough for my scenario:

  • Store config in json file.
  • Have different configuration files (development, production, …).
  • Load configs from environment variables.
  • Fallback from environment to config file.
  • App lives in one folder.
    Read More