BackendStack21 / restana

Restana is a lightweight and fast Node.js framework for building RESTful APIs.
MIT License
467 stars 27 forks source link

Is it express compatible? #115

Closed rubiin closed 1 year ago

rubiin commented 1 year ago

By express compatibale, I mean does it support all or mots middlewares.

rubiin commented 1 year ago

Also the methods signature . What are the differences like app.disable('x-powered-by'), app.set('title','hello')

jkyberneees commented 1 year ago

Hi @rubiin, while restana shares similarities with the Express.js API, it is not meant to be an exact replacement. Regarding middlewares, restana follows the "connect" approach `function middleware(req, res, next)..., please read more here: https://restana.21no.de/#/?id=middlewares

Please note that restana also supports async middlewares. Middlewares that do not return on next() will actually break this capability.

@schamberg97 has actually implemented a restana compatibility layer: https://github.com/schamberg97/restana-express, maybe a project that you would like to review.

Please also note the restana documentation: https://restana.21no.de/#/?id=introduction

Regards