Warning: web appbuilder developer edition is stand alone web apps. It can only deploy on web server, such as IIS or Apache.
You can not deploy it directly on portal. The one in portal is called build-iin edtion of web appbuilder. which no source code, no coding, you click everything on portal web page.
Step 1
copy paste source code to IIS folder
Step 2
Step 3
use machine name instead of localhost, this URL will be your web appbuilder developer edition URL, you will paste it on new portal item setting page, URL field.
Step 3.1 open index.html in chrome also work, same as you click browse:443
Step 3.2
Step 4
On portal, my content, click new item button.
Step 5
select application button
Step 6
select web mapping or other (application)
Step 7
Paste above URL in new item setting page, there is URL field.
Step 8, copy paste client ID into appID, maybe work, maybe not, depends on you use subdomain or use machine name, or use portal adaptor name.
Step 9. in this case, app id does not work, so leave appid as blank works.