aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-04-21 21:19:09 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-04-21 21:20:59 -1000
commit47a922112154cbc356eccd14c6e4f23ed668c322 (patch)
treeb76f150ee94afa75e242fabf82b2cc6018a8e6de /lib/serve.js
parentd4ebc65ac4f4a72c0ae1bd9cd5aa1fc7c7f5b22e (diff)
downloadpatchfoo-47a922112154cbc356eccd14c6e4f23ed668c322.tar.gz
patchfoo-47a922112154cbc356eccd14c6e4f23ed668c322.zip
Include ssb-npm
- Serve ssb-npm-registry requests under /npm-registry - Show install command for npm-packages messages
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 0e497ea..4b9eb1b 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -352,6 +352,7 @@ Serve.prototype.path = function (url) {
case '/npm': return this.npm(m[2])
case '/npm-prebuilds': return this.npmPrebuilds(m[2])
case '/npm-readme': return this.npmReadme(m[2])
+ case '/npm-registry': return this.npmRegistry(m[2])
case '/markdown': return this.markdown(m[2])
case '/zip': return this.zip(m[2])
case '/web': return this.web(m[2])
@@ -2534,6 +2535,12 @@ Serve.prototype.npmReadme = function (url) {
)
}
+Serve.prototype.npmRegistry = function (url) {
+ var self = this
+ self.req.url = url
+ self.app.serveSsbNpmRegistry(self.req, self.res)
+}
+
Serve.prototype.markdown = function (url) {
var self = this
var id = decodeURIComponent(url.substr(1))