Skip to content

Releases: BackendStack21/restana

Improves express compatibility

21 Jun 07:55
4884dc9
Compare
Choose a tag to compare

Improves support for express based middlewares by populating req.originalUrl

req.originalUrl === req.url // -> TRUE

More details: #45

Minor fix on error handler support

18 Jun 10:06
a006570
Compare
Choose a tag to compare

Calling next(err)within middlewares will now also trigger the global errorHandler if present.

Expose internal HTTP Server instance

02 Jun 12:45
e93c8ee
Compare
Choose a tag to compare
Merge pull request #42 from jkyberneees/expose-http-server

Expose internal http server

Making errorHandler optional for typescript

21 May 15:07
Compare
Choose a tag to compare

Fixes restana config options definitions:

  • Make errorHandler an optional property.

Properly handler error codes

21 May 14:36
Compare
Choose a tag to compare

Prevent invalid status codes from being send in case of errors.

Drop turbo-http support.

20 May 14:13
Compare
Choose a tag to compare

Support for turbo-http was dropped in v3.x.
As it shows very low level and not fully compatible with Node.js native HTTP interfaces, limiting the evolution of the features we can support.

Improving error handling

19 May 14:51
Compare
Choose a tag to compare

Supporting global error handler overwrite:

const service = require('restana')({
  errorHandler (err, req, res) {
    console.log(`Unexpected error: ${err.message}`)
    res.send(err)
  }
})

service.get('/throw', (req, res) => {
  throw new Error('Upps!')
})

service.start()

TS definitions !!!

09 Apr 15:02
Compare
Choose a tag to compare

Thanks to @tomc974 collaboration, restana now have proper typescript definitions!!!
Details: #27

properly exposing service options through getConfigOptions

05 Apr 15:52
337ea5e
Compare
Choose a tag to compare
// accessing service configuration
service.getConfigOptions()

Details: #30

Support method chaining on routes registration

04 Apr 19:09
Compare
Choose a tag to compare

Restana now supports:

  service
    .get('/', ...)
    .post('/', ...)
    .get('/chain', ...)