Open lino-levan opened 2 years ago
This is a server-rendered website. There is no need for a web-app framework.
One quick thing just to clarify my request:
I think the current codebase is messy and unmanageable and I think moving to a modern and open-source web framework would help.
Next.js uses React regardless of whether it runs on the server or the client. Our site does not require complicated logic so React is not necessary and Nunjucks (an industry-standard templating framework) is sufficient.
I agree that the codebase is messy. Extracting into modules and functions would help. Make a PR!
TypeScript compilation is already handled automatically. We use ts-node which works for our use case but you can edit the start script to use tsc if you like: "start": "tsc && node dist/index.js"
. That is not possible for our deployment because the source directory is read-only for security purposes.
In my head I always assumed that Nunjucks files ended with .njk
. Now that I realize that it IS just Nunjucks it's not as bad. When I have more time I'll create a PR.
From my understanding, ts-node
should not be used in production? According to this post on Stackoverflow, we should probably be using the --transpile-only
flag. I would either do that or spend some time to do some more proper CI/CD (with something like Jenkins?).
Thanks for clarifying.
I also think the logs for this application are horrendous. Perhaps move to a better logging tool such as Datadog. Currently, no one is alerted if the site goes down. This is unacceptable
Hmm, these are a lot of good points. Maybe a full reimplementation in Rust would make more sense..
Hmm, I do not think this makes sense. A rewrite required countless man-hours, hours which we simply don't have.
^