I’m running node.js on my Linux EC2 Instance but I’m not able to see logs when I refresh my homepage.
JavaScript
x
client.connect()
.then(function () {
return client.execute('SELECT * FROM test_keyspace.users');
})
.then(function (result) {
const row = result.rows[0];
console.log('Obtained row: ', row);
})
.catch(function (err) {
console.error('There was an error when connecting', err);
return client.shutdown().then(() => { throw err; });
});
How do I get the logs?
edit: running through pm2
Advertisement
Answer
You have to use
JavaScript
pm2 logs
to see the all latest logs