Skip to content

Commit

Permalink
Fix -> core crash when accept a request
Browse files Browse the repository at this point in the history
Fix -> route prefix removing last letter of path fixed
Update -> core logger updated
Update -> dependecied changed and package size decreased
Update -> update doc
  • Loading branch information
MR-MKZ committed Sep 9, 2024
1 parent 8d877b4 commit 953cac6
Show file tree
Hide file tree
Showing 14 changed files with 202 additions and 123 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Install Axon.js with npm
- Simple routing system
- Support methods: GET, POST, PUT, PATCH, DELETE, OPTIONS. more methods soon...
- Flexible routing system. (You can define routes in another files and then add them to core)
- Default core logger (still developing)
- Configurable core

**More features soon...**

Expand All @@ -70,14 +72,16 @@ Currently Axon has a main core and a router class which you can make instance fr

Example:
```js
import { HttpRouterCore, Router } from "@mr-mkz/axon";
import { AxonCore, Router } from "@mr-mkz/axon";

// Axon core instance
const core = new HttpRouterCore();
const core = new AxonCore();

// configuring core (not completed)
core.loadConfig({
DEBUG: true
DEBUG: true, // default false
LOGGER: true, // default true
LOGGER_VERBOSE: false // default false
})

// Router instance function
Expand All @@ -101,7 +105,9 @@ core.loadRoute(router)
core.loadRoute(router, "/api/v1")

// Starting server
core.listen(8000, "127.0.0.1", () => {
// callback function is optional and core has default log message for on start event
// core.listen("127.0.0.1", 8000)
core.listen("127.0.0.1", 8000, () => {
console.log("Listening on port 8000...")
})
```
Expand Down
Loading

0 comments on commit 953cac6

Please sign in to comment.