Catch fetch errors

This commit is contained in:
Sam Carlton 2022-12-17 13:50:40 -06:00
parent 36e022b3a5
commit fe9a2bf4ae

View file

@ -28,6 +28,9 @@ const vercelUrl = process.env.VERCEL_URL
console.log(`Server listening on https://${ vercelUrl }:${ port }/`)
const { data } = await axios.get(`http://${ vercelUrl }:${ port }/`)
.catch( err => {
console.log( 'err', err )
})
console.log( data.slice(0, 100) )