1602 / compound

MVC framework. Built on Node.JS. Works on server and browser.
http://compoundjs.com
1.6k stars 182 forks source link

Update Expressjs dependency to 4.x #628

Open xgenvn opened 10 years ago

xgenvn commented 10 years ago

I have a question about compoundjs that will maintainers consider upgrading to expressjs 4.x on roadmap? I'm looking for fresh framework which is using expressjs 4.x but seems most of them stay using 3.x.

Thank you.

qfox commented 10 years ago

same here.

xpepermint commented 10 years ago

+1

alexbaumgertner commented 10 years ago

/cc @xgenvn @zxqfox @xpepermint Maybe we can help to upgrading to expressjs 4.x? Lets offer this to maintainer :)

anatoliychakkaev commented 10 years ago

Maintainer don't mind unless you didn't break everything ;) But as far as I know express 4.0 changes it shouldn't be big problem.

On 9 July 2014 19:44, Alex Baumgertner notifications@github.com wrote:

/cc @xgenvn https://github.com/xgenvn @zxqfox https://github.com/zxqfox @xpepermint https://github.com/xpepermint Maybe we can help to upgrading to expressjs 4.x? Lets offer this to maintainer :)

— Reply to this email directly or view it on GitHub https://github.com/1602/compound/issues/628#issuecomment-48516973.

qfox commented 10 years ago

@alexbaumgertner sure, let's do it.

qfox commented 10 years ago

@alexbaumgertner Alex, I have 2 days to work on it. Can you share your work if you started already?

alexbaumgertner commented 10 years ago

I have weekends to work for it. But I am not very familiar with expressjs and compoundjs, am learning these at the time.

sachinik19 commented 10 years ago

+1

keeneym commented 10 years ago

I have migrated a few different internal services to 4.x. I found this article very helpful: http://strongloop.com/strongblog/express-3-to-4-migration-guide/

jfremy commented 9 years ago

For those interested I have an updated version that so far seems to be working fine with express 4. It's at https://github.com/jfremy/compound/tree/express4. The only thing I had to modify was the logic in injectMiddleware which does not work with express 4 + the template files to load the mw that are not included with express 4.

NOTE: if you use ejs, know that ejs 2.0 seems to be breaking with compound. So in your package.json, set it to use ejs 1.0.

To test on an existing application:

To test on a new app:

If there is not negative feedback, I'll submit a pull request

alexiskattan commented 9 years ago

Yeah ejs 2.0 is bringing down the whole shabang. I just found that out after hours and hours of poking around. Any idea why?

alexiskattan commented 9 years ago

also the npm "engines": { "node": "0.10.*", "npm": "1.4.x" },

npm can't be upgraded to 2.1.X

Any ideas?

alexiskattan commented 9 years ago

one other thing, there is an issue with cached js/css could you add this fix to your repository? https://github.com/sagish/compound/commit/6986033a53838721ec84f0b3ff0205fd486d37c8

jfremy commented 9 years ago

My express 4 branch has a fix for compound or you can check my pull request to compound that contains only the fix. https://github.com/1602/compound/pull/646

The issue is that render was calling next in the wrong place. In the case of synchronous operations in the template engine, it worked ok, but now that ejs has introduced some level of asynchrony, it failed.

jfremy commented 9 years ago

sorry for the delay but cached js/css bugfix is in