Article series about Nova

I have decided to update my article series on Nova and will start new articles soon about adding other Nova apps into your Nova app. Also how you can add openid authentication.

Nova: Getting started

I am really new to writing so feedback are welcome so I can improve.

11 Likes

And now with the correct link. :slight_smile:

I have updated the articles now with the new routes. We now allow that you can do fun Module:Function/1 or fun(_) -> {status, 200} end when you specify the routing. Instead of the old format that was {Module, Function}

1 Like

Hi Daniel, really like the first tutorial, however it seems out-of-date.
For instance I followed the article and the login-form post comes in as body for me, not as params:

% Example from Daniel Widgren got params here.
% https://dev.to/taure/getting-started-with-nova-1ioo
username_password(#{body := Body}) ->
    Map = uri_string:dissect_query(Body),
    % body => <<"username=me%40gmail.com&password=password">>,
    % Map: [{<<"username">>,<<"me@gmail.com">>},{<<"password">>,<<"password">>}]
    Params = #{
        <<"username">> => proplists:get_value(<<"username">>, Map),
        <<"password">> => proplists:get_value(<<"password">>, Map)
    },
    case Params of
        #{
            <<"username">> := Username
        } ->
            {true, #{
                authed => true,
                username => Username
            }};
        _ ->
            false
    end.

Another cool feature I read about, but was unable to correctly use was the ‘nova_admin’-portal here: git@github.com:novaframework/nova_admin.git.

I would like to know how to add the nova_apps - but was unable to get it up and running. This example shows a bit more how to properly add and use assets, but since some basics are missing the webui does not render at present if used with rebar3.

Suggestion might be to have a repository with examples?

Kind regards and thanks to you and team for Nova.

Hi,

Thank you for your feedback. :slight_smile:

I will take some time and update the article serie, maybe it is time to write an article about how to add nova apps and the concept around it.

I can see if I can find an example and send something to you or post here.

1 Like