Self-Hosting
esm.sh provides a fast, global content delivery network publicly using cloudflare, but you also can deploy your own CDN.
You will need Go 1.16+ to compile the server. The server runtime will install the nodejs (14 LTS) automatically.
Clone code
git clone https://github.com/alephjs/esm.sh
cd esm.sh
Run the sever locally
go run main.go --port=8080 --dev
then you can import React
from http://localhost:8080/react
Deploy to single host
Please ensure the supervisor installed on your host machine.
sh ./scripts/deploy.sh
Deploy to multiple hosts
- deploy manually
- deploy automatically
We are working on it.
Deploy with Docker
An example Dockerfile is found in the root of this project.