fix(starter): make scaffolded app runnable — mountpoint, Deno entrypoint, import map

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-07-11 12:56:54 -05:00
1 parent 281e8ccc17
commit dba24aa50a
4 files changed
+17 -2

No files matched your search

+3
View File
@@ -45,5 +45,8 @@ mod tests {
assert!(!html.contains("{{project_name}}"));
assert!(d.path().join("src/controllers/home.controller.ts").exists());
assert!(d.path().join("matcha.toml").exists());
assert!(d.path().join("src/main.ts").exists());
let module = std::fs::read_to_string(d.path().join("src/app.module.ts")).unwrap();
assert!(module.contains("mountpoint"));
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "tasks": { "dev": "deno run --watch --allow-net --allow-read src/main.ts" } }
{
"compilerOptions": { "experimentalDecorators": true },
"unstable": ["sloppy-imports"],
"imports": { "@green-tea/core": "npm:@green-tea/core@^26.7.0-beta.0" },
"tasks": { "dev": "deno run --watch --allow-net --allow-read --allow-env src/main.ts" }
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { Module } from '@green-tea/core';
import { HomeController } from './controllers/home.controller';
@Module({ controllers: [HomeController] })
@Module({ mountpoint: '/', controllers: [HomeController] })
export class AppModule {}
+7
View File
@@ -0,0 +1,7 @@
import { createApp } from '@green-tea/core';
import { AppModule } from './app.module';
const app = createApp({ modules: [AppModule] });
Deno.serve({ port: 8000 }, app.fetch);
console.log('🍵 green-tea running on http://localhost:8000');