The fast, easy to use & typescript ready web framework for Node.js
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.
In case of using GitHub package registry, the package name will be
@foxifyjs/foxify
.
npm i foxify
pnpm add foxify
yarn add foxify
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.
Express
, almost as fast as Fastify
)Express
middleware supportOdin
)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
Framework | Version | R/S |
---|---|---|
Foxify | 0.10.7 | 27,716.8 |
fastify | 1.13.0 | 26,654.4 |
bare | 10.13.0 | 22,366.4 |
hapi | 17.7.0 | 19,662.41 |
express | 4.16.4 | 17,468 |
restify | 7.2.2 | 14,660 |
More detailed benchmarks available here
This project exists thanks to all the people who contribute. [Contribute].
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here. [Become a sponsor]
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details
Generated using TypeDoc