Socket
Socket
Sign inDemoInstall

octoris

Package Overview
Dependencies
22
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    octoris

A functional and friendly node http framework


Version published
Maintainers
1
Install size
2.47 MB
Created

Changelog

Source

0.4.4 (2020-04-06)

  • Fixed security vulnerabilities in dev deps

Readme

Source

Octoris Logo

NPM version License Build Status Coverage Report

Standard Js

A small and simple node server framework.

Install

npm i octoris

Usage

Create a basic server:

const { listen } = require('octoris')
const routes = require('./routes')

listen({ port: 3000 }, routes)
  .then(addr => console.log(`Server Listening on ${addr}`))
  .catch(console.error)

routes.js:

const { router, response, methods } = require('octoris')
const { send } = response
const { route, fixed, composeRoutes } = router
const { GET } = methods

function homeHandler () {
  return send(200, 'Hello Home!')
}

function aboutHandler () {
  return send(200, 'Hello About!')
}

const home = route([fixed('home')], [
  GET(homeHandler)
])

const about = route([fixed('about')], [
  GET(aboutHandler)
])

module.exports = composeRoutes({ logger: true }, [about, home])

Documentation

You can find the documentation here

Official Middleware

Here is a list of official released middleware for Octoris

Contribute

Checkout the contribute file here

Please check this file regularly as it is Subject to change and updated as the project continues to develop and grow!

Keywords

FAQs

Last updated on 06 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc