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

Where is the logic? #83

Closed
GuidoS opened this issue May 29, 2015 · 4 comments
Closed

Where is the logic? #83

GuidoS opened this issue May 29, 2015 · 4 comments
Labels

Comments

@GuidoS
Copy link

GuidoS commented May 29, 2015

I cannot seem to find the logic around the choices made within the basic setup when creating the scaffolding using the express-generator. As a NewB I find it very confusing to try and keep up with the structure of the scaffolding laid out.

For example, I based on the routing documentation I cannot seem to understand why you would generate a seperate module or where to handle the keys in this setup. Also, what is the order, is it all '/' checked in router then '/' user?

Also... the complicated npm script to for start, I would love to see a document explaining that choice.

I believe in best practices and really appreciate how easy it is to setup the scaffolding, I just wish I knew why this setup was chosen and how it fits into the express documentation.

@tsurantino
Copy link

Hey Guido,

I am not the project author but I thought that I'd help answer your questions based on my experience with express-generator so far. Broadly, you should be careful directing some of the "how it works" questions to this project because express-generator is not responsible for explaining how it works.

With respect to routes being located in a separate file - you can actually find this documented on the Express website here. The order of the routes is in the order that they are listed in app.js, so that would mean that when express-generator creates a project, the project routes come before any app defined routes.

I found express-generator incredibly useful when starting out and so I hope with the information above you have as good of an experience as I did. Best of luck!

@GuidoS
Copy link
Author

GuidoS commented Jul 14, 2015

@tsurantino thanks for your thoughts.

I would disagree with you about asking "how it works". If the generator is the basis on which the scaffolding is setup and the documentation around the express framework dos not discuss the current design choices in the generator, then I think the authors of the generator should be able to let us know what design choices they have made and what the proper way to work with it is.

I guess my biggest issue is that there is no documentation of using the current scaffolding setup that is being generated anywhere, so you have to know a lot about express and how it works prior to using the scaffolding. Which makes the scaffolding a little less useful if you do not know why choices were made or how to use them.

@dougwilson
Copy link
Contributor

So our main documentation site is expressjs.com , with only the base API docs in READMEs here, so long explanations would belong on expressjs.com anyhow. We have come a long way in getting richer documentation on the site and would love for you to open an issue regarding this over at https://github.com/strongloop/expressjs.com so our team can get this addressed on our site :)

@GuidoS
Copy link
Author

GuidoS commented Jul 15, 2015

Thanks for the feedback @dougwilson

cwonrails pushed a commit to cwonrails/generator that referenced this issue Apr 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants