Skip to content

Restana is a lightweight and fast Node.js framework for building RESTful APIs.

License

Notifications You must be signed in to change notification settings

BackendStack21/restana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

542e518 · Jan 4, 2025
Apr 3, 2022
Dec 31, 2021
Sep 10, 2023
May 1, 2021
Apr 3, 2022
Oct 10, 2020
Feb 3, 2023
Oct 8, 2018
Feb 20, 2020
Nov 13, 2020
May 31, 2020
Apr 17, 2017
Feb 18, 2023
Dec 30, 2019
Jul 26, 2020
Feb 4, 2023
Jan 4, 2025

Repository files navigation

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:

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')

More