Utilities for PXE.js.
Install @pxe/utils
.
# NPM
npm i @pxe/utils
# Yarn
yarn add @pxe/utils
These are all the @pxe/utils
exported utility functions.
utils.staticDir
dir?: string
: The target directory to serve. Defaults to public
.Serve a directory.
utils.routes
dir: string
: The target route directory.Load all exports from the index file of the target directory and all of its child.
utils.routesSync
dir: string
: The target route directory.Works the same as utils.routes
but the result is not a Promise
.