Skip to content

Instantly share code, notes, and snippets.

View timwhit's full-sized avatar

Tim Whitney timwhit

  • Slalom Consulting
  • Chicago
View GitHub Profile
@timwhit
timwhit / AddressController.ts
Last active July 31, 2022 14:42
TypeScript + Node.js Enterprise Patterns
import * as express from 'express';
import {injectable, inject} from 'inversify';
import TYPES from '../types';
import {AddressService} from '../service/AddressService';
import {Address} from '../model/Address';
import {RegistrableController} from './RegisterableController';
@injectable()
export class AddressController implements RegistrableController {
private addressService: AddressService;
@timwhit
timwhit / Application.java
Last active April 8, 2016 16:30
Lego Monolith examples
@Configuration
public class Application {
public static final String SPRING_PROFILES_ACTIVE = "lego.profiles.active";
public static final String DEFAULT_PROFILE = "local";
public static void main(String[] args) throws Exception {
SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args);
String profile = Optional.ofNullable(source.getProperty(SPRING_PROFILES_ACTIVE)).orElse(DEFAULT_PROFILE);