Socket
Socket
Sign inDemoInstall

foxify

Package Overview
Dependencies
68
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    foxify

The fast, easy to use & typescript ready web framework for Node.js


Version published
Weekly downloads
49
increased by133.33%
Maintainers
1
Install size
6.08 MB
Created
Weekly downloads
 

Readme

Source

Foxify Tweet Twitter Follow

The fast, easy to use & typescript ready web framework for Node.js

Inspired by Express & Fastify

Npm Version Node Version TypeScript Version Package Quality Npm Total Downloads Npm Monthly Downloads Open Issues Closed Issues Known Vulnerabilities Dependencies Status Pull Requests License Build Status Coverage Status Github Stars Github Forks

An efficient server implies a lower cost of the infrastructure, a better responsiveness under load and happy users. How can you efficiently handle the resources of your server, knowing that you are serving the highest number of requests as possible, without sacrificing security validations and handy development?

Enter Foxify. Foxify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. It is inspired by Fastify and Express and as far as we know, it is one of the fastest web frameworks in town.

Table of Contents

Getting Started

Prerequisites

  • Node.js 8.12 or higher is required.

Installation

npm i -s foxify

Usage

const Foxify = require('foxify');

let app = new Foxify();

app.get('/', (req, res) => {
    res.json({hello: 'world'});
});

// create an error
app.get('/error', (req, res) => {
    throw new Error('I Failed :(');
});

// create an http error
app.get('/404', (req, res) => {
    throw new HttpException('Not Found', 404);
});

app.start();

More detailed sample is available.

You can also find all the documents here.

Features

  • Written in ES6
  • Robust routing (about 60% faster than Express, almost as fast as Fastify)
  • Express middleware support
  • Robust database modeling (Odin)
  • Simple and powerful error handling
  • Focus on high performance
  • HTTP helpers (redirection, etc)
  • View system supporting lots of template engines
  • Content negotiation
  • Executable for generating applications quickly
  • Error handling

Benchmarks

Machine: Ubuntu 18.04 64-bit, Intel Core i7 (8 cores), 8GiB (DDR4)

Method: autocannon -c 100 -d 40 -p 10 localhost:3000 * 2, taking the second average

sort: Request / Second

FrameworkVersionR/S
Foxify0.10.727,716.8
fastify1.13.026,654.4
bare10.13.022,366.4
hapi17.7.019,662.41
express4.16.417,468
restify7.2.214,660

More detailed benchmarks available here

TODO

  • Routing
  • Middleware support
  • Error handling
  • View engine
  • Options & Settings
  • Database Model (Odin)
  • Clustering
  • File storage
  • Job schedule
  • Logging

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Support

If my work helps you, please consider

Become A Patron

Buy Me A Coffee

Keywords

FAQs

Last updated on 06 Dec 2018

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