receiving an error when breaking server.js endpoints Chapter 5
- Dominant language
- JavaScript
- Stars
- 165
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
I am working on modularizing my server.js so that I can write better tests. Write now I have broke out the POST and the sendfile endpoints for delivering the Angular App.
I do receive this error in nodemon once I completed the process:
/Applications/MAMP/htdocs/socialNetProj/node_modules/express/lib/application.js:206
throw new TypeError('app.use() requires middleware functions');
^
TypeError: app.use() requires middleware functions
at EventEmitter.use (/Applications/MAMP/htdocs/socialNetProj/node_modules/express/lib/application.js:206:11)
at Object. (/Applications/MAMP/htdocs/socialNetProj/server.js:8:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
1 May 14:17:05 - [nodemon] app crashed - waiting for file changes before starting...
I am still working on this issue and would hope to has a solution by the end of day.. For right now anyone who has had similar issue feel free to update this thread. I will leave a link to my repo of the current issue and a video clip at my dropbox:
https://www.dropbox.com/s/k5avpi2c4alsl7u/TypeError_app.use-requires-middleware.mov?dl=0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.