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

fix several examples #3310

Closed
wants to merge 4 commits into from
Closed

fix several examples #3310

wants to merge 4 commits into from

Conversation

hiowenluke
Copy link
Contributor

@hiowenluke hiowenluke commented May 17, 2017

1. examples/params

http://localhost:3000/users/0-2
users tj, tobi <-- lost loki

Because user/0 is tj, that’s means the 0 is the data, not index of array.
So, users/0-2 must be include user/2.

 
2. examples/route-separation

http://localhost:3000
Click link "posts", jumped to the "users" page.

 
3. examples/view-constructor

http://localhost:3000/
ReferenceError: https is not defined

 
4. examples/online, examples/search, and examples/session

// install redis first:
// https://redis.io/

// then:
// $ npm install redis
// $ redis-server

If the user has installed redis, then there is no problem reinstalling redis. But if the user has not done it yet, and here does not prompt the user to install redis, this example will run failure, the user will be confused.

**1. examples/markdown**

http://localhost:3000/fail
Error: Failed to lookup view "missing" in views directory

**2. examples/params**

http://localhost:3000/users/0-2
users tj, tobi     <-- lost loki

Because user/0 is tj, that’s means the 0 is the data, not index of
array.
So, users/0-2 must be include user/2.

**3. examples/route-separation**

http://localhost:3000
Click link "posts", jumped to the "users" page.

**4. examples/view-constructor**

http://localhost:3000/
ReferenceError: https is not defined

**5. examples/online, examples/search, and examples/session**

// first (if you have not done it yes):
// $ npm install redis
// $ brew install redis   <-- lost this line
// $ redis-server

If the user has installed redis, then there is no problem reinstalling
redis. But if here does not prompt the user to install redis, this
example will run failure, the user will be confused.
@@ -1,7 +1,11 @@
// first:
// $ npm install redis online
// first (if you have not done it yes):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo? "...done it yet"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah...yet... :(

// $ npm install redis online
// first (if you have not done it yet):
// $ npm install redis
// $ brew install redis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If install instructions are added, can they be more accessible to the general user base? For example, this only works if the user is both (a) using MacOS and (b) has Homebrew installed (not of which is noted in here, just like how installing Redis was not noted before). Perhaps remove the command altogether and just add a link to Redis's site for how to install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you, Doug.

// $ npm install redis
// $ brew install redis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same Redis install instructions issue.

// $ npm install redis
// $ brew install redis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same Redis install instructions issue.

// $ npm install redis online
// first (if you have not done it yet):
// $ npm install redis
// $ brew install redis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I agree with adding this. In an example the point is to show express, the assumption being you already know you need a redis instance running somewhere. I guess I might be fine with saying ensure you have redis running on its default port, since it does not assume osx and brew.

Copy link
Member

@wesleytodd wesleytodd May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry @dougwilson your messages came in after I added mine :)

@dougwilson dougwilson self-assigned this May 18, 2017
dougwilson pushed a commit that referenced this pull request May 18, 2017
dougwilson pushed a commit that referenced this pull request May 18, 2017
dougwilson pushed a commit that referenced this pull request May 18, 2017
@dougwilson
Copy link
Contributor

Thanks very much! I split your four changes into four commits to land, and also updated the test we had for your examples/params bug to test that the bug is fixed!

@hiowenluke
Copy link
Contributor Author

Thanks Doug.

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

Successfully merging this pull request may close these issues.

4 participants