2020-07-21 03:54:25 +00:00
|
|
|
#!/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.
|
2020-09-04 14:40:16 +00:00
|
|
|
*
|
|
|
|
* Daton will automatically load and process application resources, which is
|
|
|
|
* why we need to pass in the base path of this script.
|
2020-07-21 03:54:25 +00:00
|
|
|
*/
|
2020-09-04 14:40:16 +00:00
|
|
|
const scaffolding = make(Scaffolding, import.meta.url)
|
2020-07-21 03:54:25 +00:00
|
|
|
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()
|