Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

restana

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restana - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

2

package.json
{
"name": "restana",
"version": "4.0.3",
"version": "4.0.4",
"description": "Super fast and minimalist web framework for building REST micro-services.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -181,2 +181,17 @@ # restana

```
### Nested routers
Nested routers are supported as well:
```js
const service = require('restana')()
const nestedRouter = service.newRouter()
nestedRouter.get('/hello', (req, res) => {
res.send('Hello World!')
})
service.use('/v1', nestedRouter)
...
```
In this example the router routes will be available under `/v1` prefix. For example: `GET /v1/hello`
#### Third party middlewares support:

@@ -236,2 +251,19 @@ > All middlewares using the `function (req, res, next)` signature format are compatible with restana.

## Cloud Functions for Firebase Integration
`restana` restana based services can also run as Cloud Functions for Firebase 🚀
```js
// required dependencies
const functions = require("firebase-functions");
const restana = require('restana')
// creating service
const service = restana()
service.get('/hello', (req, res) => {
res.send('Hello World!')
})
// lambda integration
exports = module.exports = functions.https.onRequest(app.callback());
```
## Serving static files

@@ -310,2 +342,2 @@ You can read more about serving static files with restana in this link:

#### Removed
- Support for `turbo-http` library was dropped.
- Support for `turbo-http` library was dropped.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc