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

Migrating from express 2.x to 3.x #311

Closed
wants to merge 3 commits into from

Conversation

davidsteinberger
Copy link

Hi Benjamin,
express 3.x seems to be stable. Here a pull request that pushes the dependency to "express": "3.x" and changes docpad.coffee according to the upgrade instructions.

All tests pass, so we should be good. What do you think?

@balupton
Copy link
Member

balupton commented Oct 1, 2012

Great stuff :) I started work on this on the dev branch, so will merge your efforts indirectly to there :) I think I missed the res.send issue.

In hindsight I should open github issues for all dev tasks that I perform, so people know what's going on! Currently I just use IRC to inform people, which isn't enough.

balupton added a commit that referenced this pull request Oct 2, 2012
- v6.7.0 October 2, 2012
	- Server changes:
		- Updated [Express.js](http://expressjs.com/) from v2.5 to v3.0
			- If you're doing custom routing, you'll want to check the
[Express.js Upgrade
Guide](https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to
-3.x)
			- There are now two server objects: `serverExpress` and `serverHttp`
- get them using `docpadInstance.getServer(true)`, set them using
`docpad.setServer({serverExpress,serverHttp})` - `server` in events,
and `docpadInstance.getServer()` return the `serverExpress` object for
backwards compatibility (however things like socket.io require the
`serverHttp` object)
			- Closes [#311](#311),
[#308](#308),
[#272](#272),
[#274](#274)
			- Help by [dave8401](https://github.com/dave8401) and [Ben
Harris](https://github.com/bharrisau)
		- Abstracted out the different middlewares to
`serverMiddlewareHeader`, `serverMiddlewareRouter`,
`serverMiddleware404`, and `serverMiddleware500`
		- Added the following options to the `server` actions:
			- `serverExpress` for a custom express.js server
			- `serverHttp` for a custom http server
			- `middlewareStandard` set it to `false` for us to not use any of
the standard middleware (body parse, method override, express router)
			- `middlewareBodyParser` set it to `false` for us to not add the
`bodyParser` middleware
			- `middlewareMethodOverride` set it to `false` for us to not add the
`methodOverride` middleware
			- `middlewareExpressRouter` set it to `false` for us to not add the
Express.js `router` middleware
			- `middleware404` set it to `false` for us to not add our `404`
middleware
			- `middleware500` set it to `false` for us to not add our `500`
middleware
		- Example API usage can be found
[here](https://github.com/bevry/docpad/wiki/API)
	- Added `standalone` attribute to files (defaults to `false`)
		- If you set to `true`, changes to the file will only cause
re-rendering of that file alone
	- Added a progress indicator during generation
		- Closes [#247](#247)
		- Help by [Bruno Héridet](https://github.com/Delapouite)
@balupton balupton closed this Oct 2, 2012
@balupton
Copy link
Member

balupton commented Oct 2, 2012

Released to v6.7.0 :)

balupton added a commit that referenced this pull request Oct 23, 2013
- v6.7.0 October 2, 2012
	- Server changes:
		- Updated [Express.js](http://expressjs.com/) from v2.5 to v3.0
			- If you're doing custom routing, you'll want to check the
[Express.js Upgrade
Guide](https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to
-3.x)
			- There are now two server objects: `serverExpress` and `serverHttp`
- get them using `docpadInstance.getServer(true)`, set them using
`docpad.setServer({serverExpress,serverHttp})` - `server` in events,
and `docpadInstance.getServer()` return the `serverExpress` object for
backwards compatibility (however things like socket.io require the
`serverHttp` object)
			- Closes [#311](#311),
[#308](#308),
[#272](#272),
[#274](#274)
			- Help by [dave8401](https://github.com/dave8401) and [Ben
Harris](https://github.com/bharrisau)
		- Abstracted out the different middlewares to
`serverMiddlewareHeader`, `serverMiddlewareRouter`,
`serverMiddleware404`, and `serverMiddleware500`
		- Added the following options to the `server` actions:
			- `serverExpress` for a custom express.js server
			- `serverHttp` for a custom http server
			- `middlewareStandard` set it to `false` for us to not use any of
the standard middleware (body parse, method override, express router)
			- `middlewareBodyParser` set it to `false` for us to not add the
`bodyParser` middleware
			- `middlewareMethodOverride` set it to `false` for us to not add the
`methodOverride` middleware
			- `middlewareExpressRouter` set it to `false` for us to not add the
Express.js `router` middleware
			- `middleware404` set it to `false` for us to not add our `404`
middleware
			- `middleware500` set it to `false` for us to not add our `500`
middleware
		- Example API usage can be found
[here](https://github.com/bevry/docpad/wiki/API)
	- Added `standalone` attribute to files (defaults to `false`)
		- If you set to `true`, changes to the file will only cause
re-rendering of that file alone
	- Added a progress indicator during generation
		- Closes [#247](#247)
		- Help by [Bruno Héridet](https://github.com/Delapouite)
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

Successfully merging this pull request may close these issues.

2 participants