Open in app

Sign In

Write

Sign In

Steve Mu
Steve Mu

172 Followers

Home

Lists

About

May 7

How to unit test Prisma ORM with mongodb-memory-server

First, we use mongodb-memory-server to create an in-memory mongodb instance, then start an instance of the PrismaClient connected to it, finally pass the instance of PrismaClient to the service class that would use the client to make database calls. // testUtil.ts import { MongoMemoryServer } from 'mongodb-memory-server'; export const createMemoryMongoDbServer = async…

Test

1 min read

Test

1 min read


Apr 10

How to deploy a Nextjs app in GitLab CICD pipeline

In this article, I am going to explain how I have deployed a Nextjs app with docker, GitLab CICD pipeline, and AWS CDK. Generally, the steps are: create two repo. One is the Nextjs app repo. …

AWS

2 min read

AWS

2 min read


Mar 7

How to deploy a Nextjs app with AWS CDK

In one of my projects, I used AWS CDK to deploy a Nextjs app. In this article, I am going to share how it was done. First, you would need to create an AWS CDK project. What is AWS CDK? AWS CDK (not SDK) is an IaC tool and is…

AWS

2 min read

AWS

2 min read


Oct 25, 2022

How to configure Keycloak with Nextjs with next-auth for authentication

install next-auth library create “pages/api/auth/[…nextauth]”.ts: import NextAuth from 'next-auth'; import KeycloakProvider from 'next-auth/providers/keycloak'; export const authOptions = { providers: [ KeycloakProvider({ clientId: process.env.KEYCLOAK_ID, clientSecret: process.env.KEYCLOAK_SECRET, issuer: process.env.KEYCLOAK_ISSUER, }), ], }; export default NextAuth(authOptions);

Keycloak

1 min read

Keycloak

1 min read


Oct 24, 2022

Create new user in Keycloak with Admin restful API

warning: I don’t consider the approach in this article is optimizal anymore. In this article, I used the admin-client in the master realm, but I think it is better to create a client in a specific realm and assign proper “service accounts roles” for it, such as the “manage-users” role: …

Keycloak

2 min read

Create new user in Keycloak with Admin restful API
Create new user in Keycloak with Admin restful API
Keycloak

2 min read


Sep 21, 2022

Evolution of authentications

In the beginning, a hidden iframe on a seemingly good page could make a request to a 3rd party website with our authentication cookie.

Bff

2 min read

Evolution of authentications
Evolution of authentications
Bff

2 min read


Sep 13, 2022

“Why Backend for Frontend Is Key to Your Microservices Journey” notes

OPTIONS is used for pre-flight request to see if a server accept certain method, headers or origins.

Architecture

2 min read

“Why Backend for Frontend Is Key to Your Microservices Journey” notes
“Why Backend for Frontend Is Key to Your Microservices Journey” notes
Architecture

2 min read


Sep 13, 2022

“AT&T Archives: The UNIX Operating System” notes

Hierarchical file system is UNIX’s invention.

1 min read

“AT&T Archives: The UNIX Operating System” notes
“AT&T Archives: The UNIX Operating System” notes

1 min read


Sep 13, 2022

“Failure is Always an Option — Dylan Beattie — NDC Copenhagen 2022” notes

failures in software is ok, just build fallbacks. In NASA’s rocket design, if a component does not work, there will be spare part to take over. If a whole module fails, there will be another module to take over.

Software Design

1 min read

Software Design

1 min read


Sep 13, 2022

“Hack Your Career — Troy Hunt” notes

“one of the best ways to make yourself more marketable as a software developer is to have an active online profile. be able to illustrate that over time, you’ve been actively involved in the areas in which you profess to have expertise” He used writing as notes to get back what he was doing if he were to do something again, such as “automating web hosting creation in Azure with PowerShell” Another idea is to be active on StackOverflow.

Careers

1 min read

Careers

1 min read

Steve Mu

Steve Mu

172 Followers

Software Engineer

Following
  • The Good Men Project

    The Good Men Project

  • Preston Lamb

    Preston Lamb

  • Zell Liew

    Zell Liew

  • Tim Denning

    Tim Denning

  • Devil’s Advocate

    Devil’s Advocate

See all (356)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams