how to create and register service provider metadata file in openidp

I am new to saml protocol and this is my first saml implementation, so don't have much depth knowledge regarding saml.

I want to know how I should create sp metadata object in nodejs? Currently I am using nodejs, passport, passport-saml for implementing saml 2.0 protocol in sp and for IDP I am using openidp (https://openidp.feide.no) and also I wanted to know how I should register sp metadata file or object in idp.

The reason to ask is because I read and found that sp should get register with IDP using metadata (vice versa), here is the link:

  1. http://samlcomponent.net/how-to-create-saml-metadata-xml-for-service-provider/

  2. "If you have a Service Provider that offers SAML 2.0 support, you may connect your Service Provider to Feide OpenIdP using the self-administration interface" you can check it on openidp website.