Skip to content

v2.0.0-rc.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@JozefFlakus JozefFlakus released this 24 Feb 20:11
· 674 commits to master since this release

Whats new?

  • @marblejs/core: replaced StaticInjectorContainer with Context API #106
  • @marblejs/core: running HTTP server is not registered anymore in context API #106
  • @marblejs/core: createServer doesn't start listening automatically. You have to run in manually via createServer().run(); #106
  • @marblejs/core: replaced bind.to function with curried bindTo #106
  • @marblejs/websockets: module doesn't depend anymore on running HTTP server dependency #106

Breaking changes

In order to use httpListener directly connected to http.createServer you have to run Reader context first:

import { createContext } from '@marblejs/core';
import * as http from 'http';
import httpListener from './http.listener';

const httpListenerWithContext = httpListener
  .run(createContext());
  
export const server = http
  .createServer(httpListenerWithContext)
  .listen(1337, '127.0.0.1');