@srfnstack/spliffy 1.1.0 → 1.1.2

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.
package/README.md CHANGED
@@ -36,7 +36,7 @@ routeDir is the only required property and should be an absolute path.
36
36
  start the server
37
37
  `node ~/app/serve.js`
38
38
 
39
- Go to `127.0.0.1:10420/spliffy`
39
+ Go to `localhost:10420/spliffy`
40
40
 
41
41
  # [Documentation](https://srfnstack.github.io/spliffy/)
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srfnstack/spliffy",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "author": "snowbldr",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/narcolepticsnowman/spliffy",
package/src/decorator.mjs CHANGED
@@ -59,6 +59,7 @@ export function decorateRequest (uwsReq, pathParameters, res, {
59
59
  }
60
60
  }
61
61
  req.params = req.spliffyUrl.pathParameters
62
+ req.query = req.spliffyUrl.query
62
63
  req.headers = {}
63
64
  uwsReq.forEach((header, value) => { req.headers[header] = value })
64
65
  req.method = uwsReq.getMethod().toUpperCase()
package/src/server.mjs CHANGED
@@ -114,7 +114,7 @@ export async function startServer (config) {
114
114
  }
115
115
 
116
116
  app.any('/*', createNotFoundHandler(config))
117
- app.listen(config.host || '0.0.0.0', config.port, (token) => {
117
+ app.listen(config.host || '::', config.port, (token) => {
118
118
  if (token) {
119
119
  log.gne(`Server initialized at ${new Date().toISOString()} and listening on port ${port}`)
120
120
  } else {