Make a request to the dev.api.novu.co
How can I switch my API call from the production endpoint to the development endpoint to improve the response time?
app.post('/api/novu/event', async (req, res) => {
try {
const novu = new Novu(process.env.NOVU_API_KEY);
novu.trigger('angular-notification-center', {
to: {
subscriberId: process.env.SUBSCRIBER_ID,
},
payload: {
},
});
const data = { message: 'Event triggered successfully' };
res.json(data);
} catch (error) {
console.error(error);
res.status(500).send('Server Error');
}
});app.post('/api/novu/event', async (req, res) => {
try {
const novu = new Novu(process.env.NOVU_API_KEY);
novu.trigger('angular-notification-center', {
to: {
subscriberId: process.env.SUBSCRIBER_ID,
},
payload: {
},
});
const data = { message: 'Event triggered successfully' };
res.json(data);
} catch (error) {
console.error(error);
res.status(500).send('Server Error');
}
});