The fast, easy to use & typescript ready web framework for Node.js
Clone or download
Permalink
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Jun 29, 2018
.vscode Closes #2 Jun 16, 2018
demo WIP Aug 20, 2018
docs WIP Aug 20, 2018
scripts WIP Jul 5, 2018
src WIP Aug 20, 2018
.gitignore Document assets Jul 1, 2018
CHANGELOG.md WIP Aug 20, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Feb 5, 2018
LICENSE Initial commit Feb 5, 2018
README.md WIP Aug 15, 2018
package-lock.json WIP Aug 20, 2018
package.json WIP Aug 20, 2018
tsconfig.json Moved database to a new repository (https://github.com/foxifyjs/odin) May 17, 2018
tslint.json WIP Aug 20, 2018

README.md

Foxify Tweet Twitter Follow

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

Inspired by Express

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 Github Stars Github Forks

Table of Contents

Getting Started

Prerequisites

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 (faster than Express)
  • 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

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: R/S

Framework Version R/S
fastify 1.7.0 26,819.6
bare 10.3.0 26,410
Foxify 0.8.0 23,928.4
restify 7.2.1 14,919.2
hapi 17.5.2 18756.6
express 4.16.3 18,454

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