Index of API Documentation
Following is the full list of independent packages associated with Weenie. Each package has its own
documentation and may be used independently of the others. This means that if you really like the Weenie
Express setup but nothing else, you can simply install @wymp/weenie-base
and
@wymp/weenie-express
and go from there.
Primary Packages
-
weenie-base - This is the core Weenie package, providing the
Weenie funciton and very little else. This is a package you can use if you want to create your own Weenie-like
framework.
-
weenie-framework - This is the whole Weenie framework,
which exports everything from all of the other weenie packages. This is the easiest way to get at a bunch of
Weenie functionality all at once.
Common Service Packages
-
weenie-logger - This package provides a simple console
logger adhering to the
SimpleLoggerInterface
. It has several configuration options including the log level and the output format.
-
weenie-express - This package provides an Express server
with a number of convenient configurations available, such as automatic error catching/formatting, automatic
fallthrough error handling, and more. This dependency is capable of using the weenie service manager (linked
below) to provide additional functionality, although the weenie service manager is not mandatory.
-
weenie-mysql - This package provides the
mysql2
client wrapped in
SimpleSqlDbInterface
. It simply takes a config object with a mysql key containing a mysql connection config object.
-
weenie-rabbitmq - This package is somewhat more experimental.
It seems messaging is an area that's a bit more prone to very specific opinions, so this may or may not work
for you.
-
weenie-cron - A simple Weenie wrapper around the
cron package. Provides a simple way to
manage cronjobs. Note that this package wants a "retry" dependency (see "retry" in the list of peripherals
below), although it is optional. If you don't supply a retry dependency, a simple 1-second retry will be used
by default.
Weenie Peripherals
-
weenie-api-client - This is a simple Weenie wrapper that
attempts to make it a little easier to fire up a generic http client. It's tuned for a specific authentication
system, but you could also easily use it without authn. This package may or may not be useful....
-
weenie-retry - Occasionally you may want certain things to
be retried with a specific algorithm. This package provides an exponential retry algorithm and a simple periodic
retry algorithm. If provided, it's used by weenie-cron and weenie-rabbitmq to retry failed jobs.
-
weenie-service-manager - Perhaps the most useful
Weenie peripheral, this provides some facilities for coordinating initialization and shutdown of an app. In
particular, it provides a
declareReady()
function that resolves a promise that
other services can await to do initialization logic. (If this function is not called within the configured
timeframe, the service is killed with an initialization error.) It also provides an `onShutdown` function that
other dependencies can use to register shutdown logic (e.g., closing a database connection or http server).