Connect PHP backend to local NOVU

Hello, I was able to connect my react frontend but how can i connect my php (laravel) backend to trigger events to my local novu?
6 Replies
Zac Clifton
Zac Clifton11mo ago
@unicodeveloper
Prosper
Prosper11mo ago
Are you using the self-hosted version of Novu? The dockerized one
Charles Derrick
Charles DerrickOP11mo ago
I forked the repo, cloned it with https and ran npm run setup:project I ran the server with npm run start:web
Mei
Mei11mo ago
Use the novu php api wrapper composer require unicodeveloper/novu And give it a base url pointing to your self-hosted instance
$config = [
'apiKey' => 'YOUR_API_KEY_HERE',
'baseUri' => 'https://custom-api-url.com/v1/'
];

$novu = new Novu($config);
$config = [
'apiKey' => 'YOUR_API_KEY_HERE',
'baseUri' => 'https://custom-api-url.com/v1/'
];

$novu = new Novu($config);
Prosper
Prosper11mo ago
Thanks @Mei
Prosper
Prosper11mo ago
You can learn how to run your self-hosted instance here https://docs.novu.co/community/run-in-local-machine
Novu
Run Novu in local machine - Novu
Prerequisites and steps to run Novu in local machine. Learn how to set up Novu on your local environment for testing and development.
Want results from more Discord servers?
Add your server