This content originally appeared on Bram.us and was authored by Bramus!
It’s been a while since I’ve set up a server with Node, but turns out Fastify is preferred over Express nowadays.
Fastify 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 Hapi and Express and as far as we know, it is one of the fastest web frameworks in town.
import Fastify from 'fastify';
const fastify = Fastify({ logger: true });
fastify.get('/', async (request, reply) => {
return { hello: 'world' };
});
const start = async () => {
try {
await fastify.listen(3000);
} catch (err) {
fastify.log.error(err);
process.exit(1);
}
}
start();
Apart from the core there are lots of plugins for authentication, cors, forms, cookies, jwt tokens, etc.
Fastify, Fast and low overhead web framework, for Node.js →
This content originally appeared on Bram.us and was authored by Bramus!

Bramus! | Sciencx (2021-03-06T22:51:21+00:00) Fastify, Fast and low overhead web framework, for Node.js. Retrieved from https://www.scien.cx/2021/03/06/fastify-fast-and-low-overhead-web-framework-for-node-js/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.