Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

receiving an error when breaking server.js endpoints Chapter 5 #27

Open
Alayode opened this issue May 1, 2015 · 0 comments
Open

receiving an error when breaking server.js endpoints Chapter 5 #27

Alayode opened this issue May 1, 2015 · 0 comments

Comments

@Alayode
Copy link

Alayode commented May 1, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant