waibu 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -22,7 +22,7 @@ async function factory (pkgName) {
22
22
  this.dependencies = ['bajo-logger', 'bajo-extra']
23
23
  this.config = {
24
24
  server: {
25
- host: '127.0.0.1',
25
+ host: '0.0.0.0',
26
26
  port: 7771
27
27
  },
28
28
  factory: {
@@ -142,7 +142,9 @@ async function factory (pkgName) {
142
142
  const { outmatch } = this.lib
143
143
  const { find } = this.lib._
144
144
  const { breakNsPath } = this.app.bajo
145
- const { ns, subNs = '', path } = breakNsPath(route)
145
+ let { ns, subNs = '', path } = breakNsPath(route)
146
+ const params = path.split('|')
147
+ if (params.length > 1) path = params[0]
146
148
  return find(this.routes, r => {
147
149
  if (r.path.startsWith('*')) return false
148
150
  r.config = r.config ?? {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {