Excore
A minimalist Express framework with dependency injection using JService. Inspired by .Net Core.
JService is a small and powerful pure javascript DI container that favors code over configuration, less oppinionated, no automatic dependency resolution, and with dependency scoping such as Singleton, Scoped and Transient.
Install
npm install excore
Sample Usage
Entry file server.js
// Create appconst app = // Configure services and applicationappstart
Startup file for adding and configuring services. startup.js
// more imports // Import services// more services // This is where we add all our services to the container { services services // Add more services // services.scoped(Foo) // Can also configure built-in/added services services } // This is where we configure our Express { // Same old middleware utility app app /** * Some of built-in Excore middlewares */ app app }
Controller
@@ // POST /api/user/create @ { res }