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

Upgrade to express 4.0 #1378

Closed
julianlam opened this issue Apr 12, 2014 · 10 comments
Closed

Upgrade to express 4.0 #1378

julianlam opened this issue Apr 12, 2014 · 10 comments
Assignees
Milestone

Comments

@julianlam
Copy link
Member

Branch express-4. Bonus points if anyone can figure out how to get NodeBB working again after commenting out the app.router() line.

Deprecates #267

@ThisIsMissEm
Copy link
Contributor

I was tempted to have a look at this, might need to reorganise a bunch of stuff though. I think we can use Router instances to segment up parts of NodeBB into more manageable chunks, each with appropriate middleware stacks.

@preeefix
Copy link
Contributor

I'll take a stab at it tonight. Parents may not be happy with events in school. (Schools are pretty much anti-phone down here, damn Github notifications getting me caught in class)

@julianlam
Copy link
Member Author

Also blocked as these upstream optional dependencies are not yet up-to-date:

@ThisIsMissEm
Copy link
Contributor

Looks like we can work around the connect-mongo issue, jdesboeufs/connect-mongo#109

@ThisIsMissEm
Copy link
Contributor

So.. this is a pretty nice world of pain. Due to changes in multiple fundamental parts of express, I'm having to re-do all the routing and middleware loading. This'll be a biggen.

You can follow my progress at https://github.com/miksago/NodeBB/compare/express-4

@ThisIsMissEm
Copy link
Contributor

Okay, I've gotten to a point where I'm starting to re-enable the HTML Views that are served, but hitting this error:

/Users/micheil/Documents/git/miksago.github.com/NodeBB/public/src/templates.js:76
        return template.replace(searchRegex, value);
                        ^
TypeError: Cannot convert object to primitive value
    at String.replace (native)
    at replace (/Users/micheil/Documents/git/miksago.github.com/NodeBB/public/src/templates.js:76:19)
    at parseValue (/Users/micheil/Documents/git/miksago.github.com/NodeBB/public/src/templates.js:219:10)
    at parse (/Users/micheil/Documents/git/miksago.github.com/NodeBB/public/src/templates.js:284:17)
    at Object.templates.parse (/Users/micheil/Documents/git/miksago.github.com/NodeBB/public/src/templates.js:39:11)
    at /Users/micheil/Documents/git/miksago.github.com/NodeBB/public/src/templates.js:66:30
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

This is when loading the homepage. Looks like the replace function receives an object for the value parameter some how.

@ThisIsMissEm
Copy link
Contributor

Might be wise for me to jump on a call with the core team over the weekend to discuss moving forward on this, it's a pretty massive fork on the code base. It's gunna hurt merging this one.

@julianlam
Copy link
Member Author

Hey @miksago -- thanks for looking into this for us. I'd like to caution you against too many large sweeping changes, since the three of us are actively developing, and merge commits will wreak havoc on your separate branch...

@ThisIsMissEm
Copy link
Contributor

@julianlam yeah, I think we need to actually do a skype call and really chat about this before we do it. It's showing a lot of parts of the platform that could potentially be structured better.

@preeefix
Copy link
Contributor

Am I allowed to jump on for idea purposes? 🐱

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

No branches or pull requests

5 participants