For further actions, you may consider blocking this person and/or reporting abuse
Read next
Fitter - Open Source no-code tool for map-reduce data from different source and even more!
Iurii Panarin -
The Resurgence of Server-Side Rendering in the JavaScript Era
Travis Ramos -
Remove Redundant Subscriptions in Angular with @jsverse/letify
Shahar Kazaz -
What does CORS really do? 🤔
Pelle Nilsen -
Top comments (7)
I don't use JS on the server side but I've seen mentioned here and on Twitter this framework which uses Node and Typescript:
nestjs / nest
A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) 🚀
A progressive Node.js framework for building efficient and scalable server-side applications.
Description
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
Under the hood, Nest makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Fastify, allowing for easy use of the myriad third-party plugins which are available.
Philosophy
In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front and backend applications, giving rise to awesome projects like Angular, React and Vue which improve developer productivity and enable the construction of fast, testable, extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers and tools…
Thank @rhymes for sharing this.
I would love to write backend in ts. It would be a wonderful experience.
The author of nodejs is actually working an improved runtime that will allow you to use typescript on the back-end!
It's not done yet so you should use what rhymes has suggested but it might be interesting to check out:
denoland / deno
A new way to JavaScript
deno
A new way to JavaScript.
Supports TypeScript out of the box. Uses a recent version of V8. That is, it's very modern JavaScript.
No
package.json
. No npm. Not explicitly compatible with Node.Imports reference source code URLs only.
Remote code is fetched and cached on first execution, and never updated until the code is run with the
--reload
flag. (So, this will still work on an airplane. See~/.deno/src
for details on the cache.)File system and network access can be controlled in order to run sandboxed code. Defaults to read-only file system access and no network access. Access between V8 (unprivileged) and Rust (privileged) is only done via serialized messages defined in this flatbuffer. This makes it easy to audit. To enable write access…
He also gave a talk on why he decided to build deno:
Interesting, he basically wrote a more secure version of Node with Rust and TypeScript :D
Yes! I really hope it will take of as a strong alternative to nodejs
It's low friction to adopt. I'm using TypeScript for the microservice architecture of my SaaS product, my backends tend to use Express at the foundation. Writing the backend in TypeScript is fairly low-friction from my experiences, there's a good amount of Type Support for npm packages (ex: @types/express)
I will note, my team has been inconvenienced by incorrect or missing type definitions a couple times with our dependency choices, but it's rare. Ours have been related to dependencies for SAML & OIDC. Know that it's going to happen, and you're going to have to choose between addressing the gaps (tooling, petitioning the dependencies to add it, writing your own), or ignoring/disabling the rule.
You can use ts-node to develop Node.ts 🤓 applications. Also see deno.