Skip to content

Commit

Permalink
Remove some debugging stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Sep 28, 2024
1 parent 50231e2 commit 209fd16
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ import { getDatabaseConnection } from "./database";
const STORIES_DIR = join(__dirname, "stories");
const MAIN_FILE = "main.js";

// const db = getDatabaseConnection();
// const app = createApp(db);

import { createTestApp, runApp, setupTestDatabase } from "../tests/utils";
const app = createTestApp();
const db = setupTestDatabase();

const db = getDatabaseConnection();
const app = createApp(db);
promises.readdir(STORIES_DIR, { withFileTypes: true }).then(entries => {
entries.forEach(async (entry) => {
if (entry.isDirectory()) {
Expand All @@ -31,7 +26,7 @@ promises.readdir(STORIES_DIR, { withFileTypes: true }).then(entries => {
});

// set port, listen for requests
const PORT = Number(process.env.PORT) || 8081;
runApp(app, PORT, () => {
const PORT = process.env.PORT || 8081;
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}.`);
});

0 comments on commit 209fd16

Please sign in to comment.