We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 668417d commit e449f95Copy full SHA for e449f95
adminforth/commands/createApp/templates/index.ts.hbs
@@ -55,7 +55,9 @@ export const admin = new AdminForth({
55
],
56
});
57
58
-if (import.meta.url === `file://${process.argv[1]}`) {
+// Cross-platform check if script is executed directly
59
+const isMainModule = import.meta.url === new URL(process.argv[1], 'file:').href;
60
+if (isMainModule) {
61
const app = express();
62
app.use(express.json());
63
0 commit comments