Serve JavaScript from your local machine to the internet without CORS disturbing your inner peace.
๐โโ๏ธ Made by @abhijithvijayan
โค๏ธ it? โญ๏ธ it on GitHub or Tweet about it.
Ensure you have Node.js 10 or later installed. Then run the following:
# via npm
npm install --global serve
# Get this serve config file
curl -fsSL https://github.com/abhijithvijayan/serve-no-cors/archive/main.tar.gz | tar -xz --strip-components=1 serve-no-cors-main/serve.json
# serve the current folder. refer: https://github.com/vercel/serve#readme
serve . -p 49241
# generate a secure tunnel with ngrok. refer: https://ngrok.com/
ngrok http 49241
Now use javascript files across web.
Sample Usage with an ngrok tunnel
<script defer src="https://bda2-103-164-21-230.in.ngrok.io/assets/main.js"></script>
Looking to contribute? Look for the Good First Issue label.
Please file an issue here for bugs, missing documentation, or unexpected behavior.
MIT ยฉ Abhijith Vijayan