sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.87k stars 136 forks source link

surge deploy from nodejs #259

Open matteo-bombelli opened 7 years ago

matteo-bombelli commented 7 years ago

is it possiblle to deploy on surge directly from nodejs?

I'm creating a local "cms" from express/electron and I would like to give the possibility to upload compiled html files to surge hosting directly from a "Publish site" button, is that possible?

Thank you!

langsor commented 6 years ago

👍

I have a similar interest where I would like to deploy via script. I've tried using the token approach

exec(`surge ./ flaky-pipe.surge.sh --token ${token}`, etc...

but that works locally only if I'm already logged in. I'm not sure how to login via script alone. I seem to be caught up in trying to interact with the surge CLI script and that is inelegant.

Related for me is running surge from a local directory, not installed globally on my machine. Is this even a possibility? I feel I'm missing something outside of my coding abilities here.

Any guidance is greatly appreciated. ~Kevin