daton/app/index.ts

24 lines
818 B
TypeScript
Raw Normal View History

#!/usr/bin/env -S deno run -c ./tsconfig.json --unstable --allow-read --allow-env --allow-net
/* Main executable for the Daton app. */
import { make, Scaffolding, Application } from './bundle/daton.ts'
import units from './units.ts'
/*
* Let's get up and running. The scaffolding provides the bare minimum
* amount of support required to get Daton up and running. The app handles
* the rest.
*
* Daton will automatically load and process application resources, which is
* why we need to pass in the base path of this script.
*/
const scaffolding = make(Scaffolding, import.meta.url)
await scaffolding.up()
/*
* Now, import the units and start the application. The units define each
* modular piece of functionality that is managed by the Daton app.
*/
const app = make(Application, units)
await app.run()