MCPcopy Index your code
hub / github.com/BackendStack21/restana

github.com/BackendStack21/restana @v6.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v6.0.0 ↗ · + Follow
55 symbols 209 edges 68 files 0 documented · 0% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Introduction

NPM version NPM Total Downloads License TypeScript support Github stars

Restana is a lightweight and fast Node.js framework for building RESTful APIs. Inspired by Express, it provides a simple and intuitive API for routing, handling requests and responses, and middleware management. It is designed to be easy to use and integrate with other Node.js modules, allowing developers to quickly build scalable and maintainable APIs.

Read more online:
- restana = faster and efficient Node.js REST APIs: https://itnext.io/restana-faster-and-efficient-node-js-rest-apis-1ee5285ce66

Performance Benchmarks

Check it yourself: https://web-frameworks-benchmark.netlify.app/result?f=feathersjs,0http,koa,nestjs-express,express,sails,nestjs-fastify,restana

Usage

Install

npm i restana

Create unsecure API service:

const restana = require('restana')

const service = restana()
service.get('/hi', (req, res) => res.send('Hello World!'))

service.start(3000);

Creating secure API service:

const https = require('https')
const restana = require('restana')

const service = restana({
  server: https.createServer({
    key: keys.serviceKey,
    cert: keys.certificate
  })
})
service.get('/hi', (req, res) => res.send('Hello World!'))

service.start(3000);

Using http.createServer():

const http = require('http')
const restana = require('restana')

const service = restana()
service.get('/hi', (req, res) => res.send('Hello World!'))

http.createServer(service).listen(3000, '0.0.0.0')

Security Defaults

Restana ships with secure defaults out of the box: - Error handling: The default error handler returns a generic Internal Server Error message, preventing internal details (stack traces, database errors, file paths) from leaking to clients. Provide a custom errorHandler to control what gets exposed. - Stream safety: Stream errors are handled gracefully, preventing connection leaks. - Immutable config: getConfigOptions() returns a frozen copy, preventing middleware from mutating internal framework options.

More

  • Website and documentation: https://restana.21no.de

Extension points exported contracts — how you extend this code

RequestExtensions (Interface)
(no doc)
index.d.ts
ResponseExtensions (Interface)
(no doc)
index.d.ts
Router (Interface)
(no doc)
index.d.ts
RegisterRoute (Interface)
(no doc)
index.d.ts
Options (Interface)
(no doc)
index.d.ts

Core symbols most depended-on inside this repo

send
called by 89
index.d.ts
start
called by 49
index.d.ts
close
called by 23
index.d.ts
use
called by 14
index.d.ts
getConfigOptions
called by 13
index.d.ts
send
called by 13
libs/response-extensions.js
routes
called by 5
index.d.ts
newRouter
called by 4
index.d.ts

Shape

Function 37
Method 10
Interface 6
Enum 2

Languages

TypeScript100%

Modules by API surface

index.d.ts18 symbols
libs/response-extensions.js6 symbols
performance/suites/res-send.js5 symbols
index.js4 symbols
specs/express-like-routes.test.js3 symbols
performance/suites/res-send-string.js3 symbols
performance/suites/res-send-promise.js3 symbols
specs/security.test.js2 symbols
performance/suites/object-delete-vs-filter.js2 symbols
specs/security-review-2026.test.js1 symbols
specs/routes-chaining.test.js1 symbols
specs/newrelic-apm.test.js1 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add restana \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact