Skip to content

Commit 6d33482

Browse files
committed
simplify server startup, as was on the original example
1 parent e6b1d93 commit 6d33482

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/search/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ app.use(express.static(path.join(__dirname, 'public')));
2929
async function initializeRedis() {
3030
try {
3131
// connect to Redis
32-
32+
3333
await db.connect();
3434

3535
// populate search
@@ -77,8 +77,7 @@ app.get('/client.js', function(req, res){
7777
(async () => {
7878
await initializeRedis();
7979
if (!module.parent) {
80-
app.listen(3000, () => {
81-
console.log('Express started on port 3000');
82-
});
80+
app.listen(3000);
81+
console.log('Express started on port 3000');
8382
}
8483
})();

0 commit comments

Comments
 (0)