restana
    TypeScript icon, indicating that this package has built-in type declarations

    4.9.6 • Public • Published

    Introduction

    NPM version NPM Total Downloads License TypeScript support Github stars

    Blazing fast, tiny and minimalist connect-like web framework for building REST micro-services.

    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

    Install

    npm i restana

    DownloadsWeekly Downloads

    3,757

    Version

    4.9.6

    License

    MIT

    Unpacked Size

    15.7 kB

    Total Files

    13

    Last publish

    Collaborators

    • jkyberneees