Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @axonlabs/core

## 0.13.1

### Patch Changes

- In previous versions hardcoded config option came back to the Axon core instance but it had some bugs and it wouldn't work.
So the logic of config loading in core edited and the problem fixed and now users can config the Axon core in hardcode mode without config file.
NOTE: Config file support is still ok.

## 0.14.0

### Minor Changes
Expand Down
42 changes: 3 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,10 @@ Currently Axon is 2X faster than Express. :D please checkout [Axon Benchmarks](.

[Axon Documentation](https://axonjslabs.github.io/AxonJs/)

Latest change: (v0.13.0)
Latest change: (v0.13.1)

- Dependency injection
Fixed some problems and dependency injection system redesigned.
1. Register your dependency into the Axon core:

```typescript
// class instance
core.registerDependencyValue('dependencyName', new DependencyClass(arg1, arg2));

// class with factory function (core will run factory function before injection process)
core.registerDependencyFactory('dependencyName2', () => new DependencyClass());

// function
core.registerDependencyValue('dependencyName3', dependencyFunction);

// Also you can register dependencies with name aliases
core.registerDependencyValue(['depClass', 'classDep', 'DB'], new DependencyClass());
```

- NeuronContainer service
Neuron Container is a service to create and handle dependency containers in your project.
Also Axon core is using Neuron Container for dependency injection feature.

```typescript
import { NeuronContainer } from '@axonlabs/core';

const container = new NeuronContainer();
container.registerValue();
container.registerFactory();
container.register();
container.resolve();
container.use();
container.clone();
container.clearScope();
container.checkDependency();
container.override();
container.listDependencies();
container.inspect();
```
- Axon core hardcode config problem
- Some dependencies removed from project and the code and project structure improved.

## Installation 📥

Expand Down
4 changes: 3 additions & 1 deletion examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { v1Routes } from './routers/v1';
import { v2Routes } from './routers/v2';
import { LogPluginTest } from './plugins/log';

const core = Axon();
const core = Axon({
DEBUG: true
});

interface Params {
id?: string;
Expand Down
Loading