Comments (15)
Oh, good catch. I wouldn't have thought to throttle the memory and test it. At any rate, thanks for work on all of this.
from legacy.
Exploring this a bit, I found that updating nanoexpress.js in the const _app creation that updating the function setting seems to not crash this.
_app.publish = (channel, message) => app.publish(channel, message);
I am still having issues with my channels/subscriptions, so I'll keep poking at it before trying a PR out.
from legacy.
After updating my local version to use the passthrough for the publish method, I was able to get it working without issue. I can provide code/examples if needed.
If it helps, here's a PR > nanoexpress/nanoexpress#100.
from legacy.
If possible, please, add example.
Thanks
from legacy.
Happy to. Thanks for addressing it so quickly. :)
https://github.com/joeyshipley/nanoexpress-publish
I have a local project that has a front end listening to the channel and it receives messages after the change. It's much larger though, not sure how to easily share end results past the server staying alive.
from legacy.
Issue not fixed, i got error
nanoexpress on master [⇣] is 📦 v2.0.2 via ⬢ v13.14.0
❯ NODE_ENV=development node examples/pub-sub.js
[nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +0ms
[nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +2ms
[nanoexpress:error] `fast-json-stringify` was not found in your dependencies list, please install yourself for this feature working properly +0ms
[nanoexpress:log] [Server]: started successfully at [localhost:4000] in [7ms] +0ms
Sending publish/broadcast message to channel > my-channel
fish: 'NODE_ENV=development node examp…' terminated by signal SIGSEGV (Address boundary error)
nanoexpress on master [!?] is 📦 v2.0.3 via ⬢ v13.14.0
❯ bash
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ node -v
v13.14.0
bash-3.2$ NODE_ENV=development node examples/pub-sub.js
[nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +0ms
[nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +2ms
[nanoexpress:error] `fast-json-stringify` was not found in your dependencies list, please install yourself for this feature working properly +0ms
[nanoexpress:log] [Server]: started successfully at [localhost:4000] in [5ms] +0ms
Sending publish/broadcast message to channel > my-channel
Segmentation fault: 11
bash-3.2$ NODE_ENV=development node --trace-uncaught examples/pub-sub.js
[nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +0ms
[nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +2ms
[nanoexpress:error] `fast-json-stringify` was not found in your dependencies list, please install yourself for this feature working properly +0ms
[nanoexpress:log] [Server]: started successfully at [localhost:4000] in [4ms] +0ms
Sending publish/broadcast message to channel > my-channel
Segmentation fault: 11
bash-3.2$ npm outdated
^C
bash-3.2$ exit
exit
nanoexpress on master [!?] is 📦 v2.0.3 via ⬢ v13.14.0 took 1m25s
from legacy.
Hrm, I'm still on LTS. I'll pull that node version and see on my end. -- update 13.14.0 worked for me also. I'm going to poke around and see if I can't make it fail again locally.
from legacy.
I updated example repo to specifically point to the patch, I forgot to do that earlier. I'll keep poking around, but if you could try that again it would be helpful.
from legacy.
Sorry, I'm learning some of this. How did you pull down v2.0.3?
from legacy.
It’s locally, just increased patch number
from legacy.
LTS maintenance mode comes later as currently I don’t have enough time to migrate, move to separate branch
from legacy.
I catch another bug while testing recently, so much bugs and so less time
from legacy.
Was thinking it might be a build/compile issue, but building from the fix repo keeps the code inline and worked for me again. Going to think about this and see if I can come up with a different direction to reproduce locally.
Do you have a different example, I can try that also if you do.
from legacy.
Please look at new branch docs/example-pub-sub, error while running as described here.
Can be run with this command NODE_ENV=development node --trace-uncaught examples/pub-sub.js
from legacy.
Thank you for bug-report.
Of course, i didn't throttled memory, MS VSCode and Apple AppStore did it for me 😆
from legacy.
Related Issues (20)
- Using socket.io + nanoexpress on the same port? HOT 1
- 404 error sometimes HOT 1
- ws handler will parse invalid JSON strings without a try catch block causing server to crash on malformed inputs HOT 1
- UnhandledPromiseRejectionWarning and app.setValidationErrorHandler() HOT 4
- Warning! PRO and PRO (ESM) version will be moved to Private repository HOT 1
- Is handlebars supported in nanoexpress like expressjs? HOT 4
- User forum HOT 4
- JSON body HOT 4
- Enable CORS HOT 5
- Method signature inconsistency - setNotFoundHandler HOT 3
- How to log everything HOT 7
- Options method does not return any data HOT 9
- How to use subscribe publish HOT 2
- websocket parameter wrong interface HOT 4
- Not found handler not activated HOT 5
- [Bug] Throw in async routes doesnt work HOT 4
- Question: No CommonJS for the simple version? HOT 6
- nanoexpress CJS - End of Life date
- Problems when using the examples that include an schema as a middleware HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legacy.