purescript-webrow / webrow

Let's build a highly opinionated but fully-featured web framework in PureScript
BSD 3-Clause "New" or "Revised" License
23 stars 0 forks source link

Registration endpoints #1

Closed paluh closed 4 years ago

paluh commented 4 years ago
  1. Endpoints
  1. Routing duplex

Let's start with well typed routes - something like (this has been written without second thought so please modify it as you want :-):

    newtype Email = Email String

    data Route
      = Login String
      | Registration Email
     -- | `These` for two passwords
      | RegistrationAccept Email (Maybe (These String String))

A lot of route examples are here: https://github.com/paluh/magusai/tree/master/src/Route

Please don't hesitate to ask if you have some question related to routing duplex :-)