Skip to content

Commit

Permalink
simplify server startup, as was on the original example
Browse files Browse the repository at this point in the history
  • Loading branch information
vinybk committed Jan 12, 2025
1 parent e6b1d93 commit 6d33482
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ app.use(express.static(path.join(__dirname, 'public')));
async function initializeRedis() {
try {
// connect to Redis

await db.connect();

// populate search
Expand Down Expand Up @@ -77,8 +77,7 @@ app.get('/client.js', function(req, res){
(async () => {
await initializeRedis();
if (!module.parent) {
app.listen(3000, () => {
console.log('Express started on port 3000');
});
app.listen(3000);
console.log('Express started on port 3000');
}
})();

0 comments on commit 6d33482

Please sign in to comment.