Day 8 at the Recurse Center

- 1 min

Today my goal for fnz is to make progress towards figuring out routing! It’s one of the must haves, even for micro frameworks, so I’m pretty excited to get into it. My goal for right now is to emulate Sinatra with this basic style

get '/' do
  .. show something ..

post '/' do
  .. create something ..

put '/' do
  .. replace something ..

patch '/' do
  .. modify something ..

delete '/' do
  .. annihilate something ..

At this point I think that will mean defining methods for each of the HTTP request types and being able to pass a route and block to those methods. I’m not 100% sure of what the routing situation will look like when I’m done though. I think if I just start getting into the weeds of it I’ll start to see a path.

Andrew Pierce

Andrew Pierce

Software Engineer based in Durham, NC

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora