Fasify.io β‘οΈ
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 Fastify. 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. π₯
Install π₯
πΉπΈπΉπΈ
[ Example ]
πΉπΈπΉπΈ
[ Async-Example ]
https://t.me/pgimg/102
[ Website ] : https://www.fastify.io
γ°γ°γ°γ°γ°γ°
#JavaScript #NPM #Fastify
@ProgrammingTip
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 Fastify. 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. π₯
Install π₯
npm install fastify --save
πΉπΈπΉπΈ
[ Example ]
// Require the framework and instantiate it
const fastify = require("fastify") ()
// Declare a route
fastify.get("/", function (request, reply) {
reply.send({ hello: "world" })
})
fastify.listen(3000, function (err) {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})
πΉπΈπΉπΈ
[ Async-Example ]
const fastify = require('fastify')()
fastify.get('/', async (request, reply) => {
reply.type('application/json').code(200)
return { hello: 'world' }
})
fastify.listen(3000, function (err) {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})
https://t.me/pgimg/102
[ Website ] : https://www.fastify.io
γ°γ°γ°γ°γ°γ°
#JavaScript #NPM #Fastify
@ProgrammingTip
Telegram
Programming Tips Resources
What Happened When I Peeked Into My Node_Modules Directory π€―
The left-pad fiasco shook the JavaScript community to its core when a rouge developer removed a popular module from npm, causing tens of projects to go dark. β
While code bloat continues to slow down our websites, drain our batteries, and make βnpm installβ slow for a few seconds, many developers like myself have decided to carefully audit the dependencies we bring into our projects. π
Itβs time we as a community stand up and say enough is enough, this community belongs to all of us, not just a handful of JavaScript developers with great hair. π₯
I decided to document my experiences in auditing my projectsβ dependencies, and I hope you find the following information useful. β
https://t.me/pgimg/173
[ Article ] : kutt.it/nmo
γ°γ°γ°γ°γ°γ°
#JavaScript #NPM
@ProgrammingTip
The left-pad fiasco shook the JavaScript community to its core when a rouge developer removed a popular module from npm, causing tens of projects to go dark. β
While code bloat continues to slow down our websites, drain our batteries, and make βnpm installβ slow for a few seconds, many developers like myself have decided to carefully audit the dependencies we bring into our projects. π
Itβs time we as a community stand up and say enough is enough, this community belongs to all of us, not just a handful of JavaScript developers with great hair. π₯
I decided to document my experiences in auditing my projectsβ dependencies, and I hope you find the following information useful. β
https://t.me/pgimg/173
[ Article ] : kutt.it/nmo
γ°γ°γ°γ°γ°γ°
#JavaScript #NPM
@ProgrammingTip
Telegram
Programming Tips Resources