Closed nfantone closed 5 years ago
You'll need to:
1) pass context
to the config. Docs reference this as Express ()
but new Router()
should work.
2) pull context out with seneca.export('web/context')()
-- if this is the app you can call listen
on it. If it's a router you can pass it to app.use
A lot of the docs on getting started and the seneca-attic/getting-started repo were out of date. I'm submitted a few PRs for fixing these to use the latest API.
Closing old tickets that should be resolved now.
From https://github.com/senecajs/senecajs.org/issues/266 Original author: @chessmonster
I'm a noob at seneca and I'm just trying to run sample codes from Developing Microservices with Node js, and it says:
but Im getting an error that says:
Also I tried to run another sample code copied from the web, I'm sorry I just can find the link. But I just copied, pasted and tried to run and I got the same error. I'm thinking this is more of a setup issue?
I'm still trying to play with this. The way I understand this is that on app.use line, basically I'm just calling the seneca-web module. so what I did was
instead of
then I ran node app.js, it ran the script with no error in the command. but when tried to access the module from a browser, then I got the error saying util is not found and is pointing to the seneca web file, which actually is from a call from seneca.