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 ..
end

post '/' do
  .. create something ..
end

put '/' do
  .. replace something ..
end

patch '/' do
  .. modify something ..
end

delete '/' do
  .. annihilate something ..
end

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