Continuing the discussion from Replit is Broken:
I’ve seen you mention this before, what are the advantages of it over express, and how easy is it to switch between them?
Continuing the discussion from Replit is Broken:
I’ve seen you mention this before, what are the advantages of it over express, and how easy is it to switch between them?
I say Fastify is better because as someone who isn’t experienced with JavaScript (yet) for web hosting, Fastify makes setting up a server easy. I don’t really care much about the backend as far as I am concerned at this time of being (and my skills which naturally means that I want to set up a server as easily as possible. While there are other benefits to Fastify, I focus on one thing: speed.
Fastify (IIRC) is one of the fastest (hence the name) if not the fastest frameworks and usually I care more about the front end than the backend so updates show really quickly and the website itself is very fast. Express feels slower, even if it generally has more support.
Also, I know some people can explain this but when I use Express, redirecting to different HTML pages doesn’t work, and getting things like stylesheets from index.html is useless because it just doesn’t get it. Fastify (or fastify-express) automatically makes it work and I generally don’t have to worry about changing anything in the backend to make the frontend work. Fastify can handle more requests per second than Express too, just wanted to point that out
Ultimately Express and Fastify are helpful in different situations, but I’m pretty sure Fastify has a lot of support too, and switching over shouldn’t be TOO hard.
Then you’d love React, lol.
Then you’re doing it wrong. You can fork an example Repl I made that uses Express.
I’ll need to look more into Fastify to confirm that, as I’m not sure what you mean by “automatically.”
Hm. Usually works for me, how are you trying to redirect?
I don’t understand what you mean by this, could I have a little clarification?
Judging by a quick look, I would still go with express. It seems the goal of fastify is to be a fast and efficient web server, but if you truly want a fast and efficient web server, you would not be using node in the first place. (And express seems more popular, which has alot of benefits, like middleware and probably better maintenance)
I do rely on middleware.
I did not mean middleware support, I mean lots of easy-to-use pre-built middleware from the community
I think we both misunderstood that, lol.