Interviewer: "What language are you most comfortable with?"
davidad: "C."
Interviewer: "Oh. We usually have people make a web app, so..."
davidad: "No problem. I'm prepared for this."
nginx: I follow these instructions to get a local build ofnginxfrom the OpenResty distribution, but your package manager'snginxbinary should be just fine for our purposes hereredis: usually[package-manager] install redishiredis: usually[package-manager] install hiredis; make sure that the libs are actually available (I didsudo ln -sf /usr/local/opt/hiredis/lib/* /usr/libandsudo ln -sf /usr/local/opt/hiredis/include/* /usr/include)
###Makefile targets
$ make run # runs the app, compiling it and spinning up redis and nginx if necessary
$ make nginx.pid # spins up nginx
$ make redis.pid # spins up redis
$ make kill-nginx # shuts down nginx
$ make kill-redis # shuts down redis
$ make resetdb # deletes the redis.rdb database, shutting down redis first if necessary
$ make clean # shut down everything, remove binary and log files. run before `git commit`