How to run JS applications from GitHub repo without installing software
Today I will show you a simple trick which helps you to run JavaScript application from GitHub repo without installing any software and without cloning the repo in your computer.
If you want to see any JavaScript based application in action from this blog you have to follow below steps
- Install NodeJS in your computer.
- Next you need to clone the repo
- Got to the project folder and run
npm install
andnpm start
commands.
If you follow below steps you can directly run the JavaScript application in your browser and see it in action.
step 1) Go to the GitHub repo
Eg: https://github.com/sureshgadupu/mapbox/tree/master/react-map-gl-eq-markers
Step 2) In the address bar change the start of the url from github to githubbox and press enter button.
Eg: https://githubbox.com/sureshgadupu/mapbox/tree/master/react-map-gl-eq-markers
Step 3) Browser will automagically redirects to Codesandbox and you can see the home page of the application on right side frame.
You might be wondering how this magic happens. Codesandbox is integrated with GitHub and it will redirect the URL to Codesandbox which will open the application in the browser.
CodeSandbox is an online editor tailored for developing JavaScript based web application.
Below video shows sample demonstration of opening JS GitHub repo in codesandbox
If you click on the fork button, you can change the source code and see how your changes work.
If you register with codesandbox you can export the code to your github repo and you can also share the working example with friends or collegues.