After installing ssb-git I now want to use ssb-npm.
%aGao3JS86LqAcLkZ6b8J+l675QqObfmctdXAnHeyP0k=.sha256
After installing ssb-git I now want to use ssb-npm. For that I added the package ssb-npm-registry and ssb-links to the patchwork configuration. After trying to use it without success I explored the request I was making. It turns out that it does not add the port in this.baseUrl (http://localhost:7718/%25pFqjcdVKHqsrtOjVEAVZeCF0iY4s%2B3Hr0vA3EFCq5UM%3D.sha256/blob/aaa1df0018178db95a6bc4d24a4db3ec9f8975bc/index.js#L548)
A quick fix was to add this code and then everything worked fine.
if (this.baseUrl) {
var port = req.headers.host.split(':')[1] || 8043
this.baseUrl = this.baseUrl.replace(/\/+$/, '') + ':' + port
}
@gmarcos87 Are you adding that code after the existing if (this.baseUrl) {…} else {…}
, or replacing part of it? It is easiest to see if you show a diff. Also, do you have any {"npm":{"baseUrl": …}}
set in your ~/.ssb/config
?
The code block was replacing the existing if, but you are right, in the .ssb/config file I have http://localhost as baseUrl.
Built with git-ssb-web