Hi all, hopefully not too dumb a question. We’re t...
# developers
n
Hi all, hopefully not too dumb a question. We’re trialing the platform plan. I’ve cloned the cal.com repo and got everything running locally, api calls working. Now I’m trying to embed the calendar in our app. Am I understanding correctly we basically treat this like our own package, publish to npm then import to our project to use the react components in our app for the self-hosted plan? Feel free to point me in the direction of the right docs, but after getting the instance up locally I don’t see much. I’ve seen the embed docs for the non-self-hosted plans but obviously that hardcodes the link
<http://cal.com/{{username}}|cal.com/{{username}}>
in the `Cal`component and in my case right now the link would be
localhost:3001//{{username}}
. Looking for some direction for embedding the calendar on the self-hosted plan, thanks!
p
hey there, no you should be able to use the existing NPM package but with your link, no? @Hariom Balhara
oh. wait. maybe you are right
@Hariom Balhara i think we need to allow external links in <Cal link=“https://customdomain.com/peer/30min” />
what you can do in the meantime is to edit the hardcoded link and do:
yarn build
which will create a embed.js file in public: cal.com/embed.js
that way you can use your custom embed script without using NPM at least
but i think having a custom input for the current react embed would be simpler
n
Just to make sure I understand, I’d install the existing
@calcom/embed-react
package in my project. Where would I edit the hardcoded link? In the
node_modules
?
p
you dont have to use the NPM package, all of it is here: https://github.com/calcom/cal.com/tree/main/packages/embeds/embed-react
but i will speak with @Hariom Balhara if there is an easier way
n
Great thank you!
h
@Nicole You can use the existing npm package for this. That works for both self hosted and hosted scenario. You should be able to configure it like this https://github.com/calcom/cal.com/issues/7326.
n
Amazing, thank you!