News for hackers. Stuff that matters.
Re:Show HN: Routerless by skrebbel on Monday July 10, 2017 @03:11PM (#14738759)
I think I like the idea, but the docs are a major puzzle. This is a library for mapping URLs to data (or function calls? not sure) without a single URL in the docs. There is also a demo, which shows that it works, but not how it works (no source code displayed except if i want to dig down in the entire site's source code).

@madmaniak, add some examples, please :-)

Re:Show HN: Routerless by madmaniak on Monday July 10, 2017 @04:45PM (#14739487)
Thank you for kind words and sorry for being so enigmatic.

Step 1: Attach pro-router

Step 2: R.init(root: 'helloworld')

Step 3:

R.write('foo', 'bar')

# url changes from '/' to '/helloworld/foo/bar'

R.param('foo') # => 'bar'

Please ask me any use case you'd like to solve. I'll try to explain more.