Skip to content

Commit 31f8dea

Browse files
committed
Revert "live-demo: add debug logs to the live-demo build"
This reverts commit 335d37b.
1 parent e150205 commit 31f8dea

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

live-demo/app/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,12 @@ async function seedDatabase() {
152152

153153
if (import.meta.url === `file://${process.argv[1]}`) {
154154
// if script is executed directly e.g. node index.ts or npm start
155-
console.log('Starting app...', new Date().toLocaleTimeString());
156155
const app = express()
157156
app.use(express.json());
158157
const port = 3500;
159158

160159
// needed to compile SPA. Call it here or from a build script e.g. in Docker build time to reduce downtime
161-
console.log('Check if we need to bundle AdminForth...', new Date().toLocaleTimeString());
162160
if (process.env.NODE_ENV === 'development') {
163-
console.log('Bundling AdminForth, please wait...', new Date().toLocaleTimeString());
164161
await admin.bundleNow({ hotReload: true});
165162
console.log('Bundling AdminForth done');
166163
}
@@ -275,12 +272,10 @@ if (import.meta.url === `file://${process.argv[1]}`) {
275272
)
276273
);
277274

278-
console.log('Discovering databases and seeding data if needed, please wait...', new Date().toLocaleTimeString());
275+
279276
// serve after you added all api
280277
admin.express.serve(app)
281-
console.log('AdminForth middleware added to express app', new Date().toLocaleTimeString());
282278
admin.discoverDatabases().then(async () => {
283-
console.log('Database discovered', new Date().toLocaleTimeString());
284279
//
285280
// !!! IMPORTANT !!!
286281
// NEVER COMMIT ANY COMMANDS TO INSERT USER WITH superadmin ROLE HERE!!!
@@ -302,10 +297,9 @@ if (import.meta.url === `file://${process.argv[1]}`) {
302297
}
303298

304299
await seedDatabase();
305-
console.log('Database seeding done, starting server...', new Date().toLocaleTimeString());
306300
});
307301

308-
console.log('Starting express server...', new Date().toLocaleTimeString());
302+
309303
admin.express.listen(port, () => {
310304
console.log(`Example app listening at http://localhost:${port}`)
311305
console.log(`\n⚡ AdminForth is available at http://localhost:${port}${ADMIN_BASE_URL}\n`)

0 commit comments

Comments
 (0)