At a current client, we’re looking to move (most of) our AWS Lambda functions to NestJS. The company has built up an extensive collection of Lambda functions and it’s time to bring some structure and similarity in them. But NestJS is geared towards incoming HTTP calls. This is fine if your Lambda function is behind an API Gateway, but is it possible to use NestJS if your Lambda function should be triggered by SNS events? Uniformity? Those who know me,

Have an old(er) ASP.NET project where javascript files put all their functions and variables in the global namespace? Want to move to modern javascript (ES2015) with dynamic module loading? If you don’t know where to begin, this guide might be able to help you. I was facing the same issue in an ASP.NET project (MVC, but it should be possible for WebForms too). It’s actually quite simple. We’ll go from this: Browser loads a page Browser loads all included javascript

I have written and talked about how I’ve stopped going to user group sessions, but recently I’ve found the urge to reconnect with some sort of community again. I still find bigger conferences like Techorama or ngEurope interesting, especially if they get me out of the Microsoft-centric world I find myself in due to working for big corporations in Belgium. So I was pleasantly surprised to receive a mail from one Jan Rauter where he introduced a new community, revolving

I’m really a fan of Metalsmith, which I’ve written about before. It’s super easy to get up and running, and the syntax is simple too. Also nice, is the fact that it doesn’t choose between configuration or code. You can use either a JSON file or Node. At a certain point in time, you’re likely to need something that nobody has written a Metalsmith plugin for yet. This is probably more true now, when it’s still quite early days for

In my previous post on Metalsmith, I explained how to get up and running with Metalsmith. I used a metalsmith.json configuration file. But it is also possible to use a javascript file and let NodeJS run it. Take this metalsmith.json file for example: { “source”: “src”, “destination”: “build”, “plugins”: { “metalsmith-drafts”: true, “metalsmith-markdown”: true, “metalsmith-layouts”: { “engine”: “handlebars”, “partials”: “partials” } } } This can be mapped to the following javascript file: var Metalsmith = require(‘./node_modules/metalsmith’), drafts = require(‘./node_modules/metalsmith-drafts), markdown

Being a consultant, I am now the owner of a (humble) company. And a company should have a website, no? But this website doesn’t need to many bells and whistles, and I’m keeping my blog at www.petermorlion.com, so a static html website would do. I know about Jekyll, but it’s Ruby and I’m on Windows, and I know it’s possible, but it’s a bit of a hassle. I took a look at Brunch but it’s more of a general-purpose tool.

In one of my previous posts on Aurelia, I set up Aurelia with ASP.NET, using jspm to load my scripts, and Babel to transpile the ES2015/2016 (previously called ES6/7) to ES5. The problem is, this happens on-the-fly. This will reduce the speed of our app, as there is extra processing done when the user requests a page. Also, there is no reason to do this, as the scripts can be transpiled before deploying (i.e. when building our app in Visual

Aurelia is a great framework for a SPA, but one thing that is missing, I feel, is getting server-generated templates. By default, Aurelia uses the moduleId to fetch a static HTML file. Take this configuration: router.configure(config => { config.map([ { route: [”,’Welcome’], moduleId: ‘./welcome’ }, { route: [‘About’], moduleId: ‘./about } ]); }); When you navigate to #About, two calls will be made: http://www.example.com/about.html http://www.example.com/about.js If your view is at some other location, you can customize the ConventionalViewStrategy.convertModuleIdToViewUrl function: ConventionalViewStrategy.convertModuleIdToViewUrl

Update This post is no longer up to date, as you can now bind to the files attribute of your input element: <input type=”file” files.bind=”files” /> This would bind to the files property of your viewmodel. This was the original post: I’m getting up to steam with Aurelia and really like it. One thing that is missing, though, is one-way databinding from view to viewmodel. There is a GitHub issue for it, so I suspect this will be included at

A small post for my own reference, and yours if you need it. It took me a while to get this working. In ASP.NET 5, the WebAPI Controller is no longer the same as the WebAPI 2 Controllers we’re used to. These Controllers are quite specific on how they accept content. Aurelia has an easy way of posting to a Controller: import {HttpClient} from ‘aurelia-http-client’ @inject(HttpClient) export class MyViewModel { constructor(http) { this.http = http; } callService() { this.http.post(‘http://some/url’, {