Skip to content

Latest commit

 

History

History

whook-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@whook/example

A basic Whook server

GitHub license

This is a basic Whook server demonstrating the various usages of the Whook framework to build REST APIs.

Usage

To run the server in production:

npm it
NODE_ENV=production APP_ENV=production npm start

You can understand deeply this repository and Whook's internal by simply reading the Architecture Notes. The "See in context" links drive your directly in the concerned implementation so that you can just see the code that explains the notes.

Feel free to continue creating architecture notes and to regenerate the markdown file by running:

npm run architecture

Dev

Start the server in development:

# Simple dev mode
npm run dev

# Watch mode
npm run watch

Create a new endpoint / service / provider or command:

npx whook create

Play with the REPL:

npm run repl

List available commands:

npx whook ls

Generate API types:

npm run apitypes

Debug

Execute a handler in isolation:

npx whook handler --name putEcho --parameters '{"body": { "echo": "YOLO!" }}'

Debug whook internals:

DEBUG=whook npm run dev

Debug knifecycle internals (dependency injection issues):

DEBUG=knifecycle npm run dev

Authors

License

MIT