Hi, I’m making a Single Page Application and I want some of the routes to be live demos of other projects I’ve completed. My question is how do I add those projects to my SPA? I’m thinking the best way might be to make those projects packages on npm then add them as dependancies to the SPA. Is this the right idea or is there another approach worth considering?
Where is the code?
If you have projects on codepen or another online service, you can embed them on your page as well. Codepen has the embed code on the bottom right of the pen.
The code for the various projects is scattered over multiple repos because I didn’t have the intention of including them in one big project when I made them. I’m going to serve the app that contains the other project demos (which im going to call the main app for brevity) from a heroku server. I want the live demos to be their own client side routes within the main app as opposed to being embedded in the page by a 3rd party service like codepen. I’m, just not sure of the best way to transfer the demo into my main app code, becuase it isn’t a problem I’ve dealt with before.
Hope this makes sense.
I don’t know if I understand what you’re trying to do, but have you looked into using iFrames?
Thanks for the suggestion, I’ll try and fiund out if I can apply this to my situation (haven’t used iframes before!)