Docs / Configuration / main.ts
3.2. main.js
Declare the Spools to load, set filesystem paths, and other basic application settings.
// config/main.ts
import { RouterSpool } from '@fabrix/spool-router'
import { HapiSpool } from '@fabrix/spool-hapi'
import { MapnikSpool } from '@fabrix/spool-mapnik'
import { resolve } from 'path'
export const main = {
spools: [
RouterSpool,
HapiSpool,
MapnikSpool
],
paths: {
root: resolve(__dirname, '..'),
// ... other paths
}
}
main.spools
The list of Spools to load into the framework. Spools to include can be found on the Plugins page. Note: if main.spools is empty, the program will start and immediately exit!
As discussed in the Fabrix Design Theory section:
The Fabrix framework has exactly one feature: the ability to harmoniously manage Spools. The capability available to the developer is thus an emergent property of the Spools the user has installed.
Read more about Spools:
main.paths
Fabrix and Spools use these paths during runtime for many reasons. Fabrix and some Spools may store temporary information such as REPL history, compiled asset files, logfiles, etc.