Saturday 4 February 2017

State of Express and Koa with TypeScript?

Hey there. I am a full stack dev who (at work) uses Aurelia + TypeScript for building SPAs, and C# + ASP.NET Web API 2 for building my RESTful APIs.I run Linux at home and after a while decided I didn't want to mess with ASP.NET Core until it became a bit easier to work with on Linux.So, for my at home back end tech of choice, Node is the obvious answer. I have used it before and made a simple chat app using Express and Socket.io.Since I am a TypeScript lover and also know C#, the async/await support in Koa seems ideal for my current daily skill set. I already use async/await and love all of my ES6/ES7 features (destructuring, spread, decorators etc), so I'd really love to continue with TypeScript or at least ES6+ code versus dealing with callbacks explicitly. This also seems pretty nice compared to Express:exports const controller = { index: async ({ request, response }) => { response.body = 'Hello World!'; } } I'd love to hear some opinions as most I find are 7-12 months old. My goal is to master Node at home while using TypeScript so A. I can continue to master my TS skills for work and leisure and B. I can gain Node experience for the next steps in my career, while I master C# at work.edit* In the end, I will be using C#/Web API 2 professionally for the foreseeable future as I don't plan on leaving my current job any time soon. This again makes me think Koa is a better choice for the future. I am quite aware these frameworks could be scoffed at in two years, but I know JS/TS very well and can change frameworks as needed, so we can avoid that conversation. Thanks everyone.

Submitted February 04, 2017 at 02:17PM by bburc

No comments:

Post a Comment