Can I include a meteor application like I can with Javascript?


#1

I’ve currently got a chat app that is done in Javascript so that we can include the chat on any website easily with one line of code which is just a script tag that pull in our .js.

I’d like to rewrite that app in Meteor.

Is it possible to include a Meteor app like you can javascript code?


#2

This isn’t possible with a full meteor application as Meteor expects to be in control of the entire page. You might be able to include the a script tag with the src attribute pointing to the compiled js file on the meteor server but my guess is it would hijack your page. You have a couple options though, you could use an iframe which personally is the route I would go, or you could use the meteor core packages to create the scripting that connects to a Meteor back-end.