Skip to content

Serve JavaScript from your local machine to the internet without CORS disturbing your inner peace.

License

Notifications You must be signed in to change notification settings

abhijithvijayan/serve-no-cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

serve-no-cors

Serve JavaScript from your local machine to the internet without CORS disturbing your inner peace.

🙋‍♂️ Made by @abhijithvijayan

Donate: PayPal, Patreon

Buy Me a Coffee


❤️ it? ⭐️ it on GitHub or Tweet about it.

Table of Contents

Installation

Download and setup ngrok

Ensure you have Node.js 10 or later installed. Then run the following:

# via npm
npm install --global serve

Usage

# 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>

Issues

Looking to contribute? Look for the Good First Issue label.

🐛 Bugs

Please file an issue here for bugs, missing documentation, or unexpected behavior.

See Bugs

License

MIT © Abhijith Vijayan