Publish Static Content
We discussed already how you can Publish a Local Webserver, but sometimes you have a tiny project that just doesn’t have a webserver yet. For this case diode has a tiny builtin webserver you can use to publish anything!
Have fun with this, and let use know in our Telegram channel if you have any feature requests!
#Publish Static Content
Let’s make this a tiny but complete example. First you got to install Diode. Once that is done we’re going to create a project directy and create a hello world file. (All of this is done in the Terminal):
mkdir project
cd project
echo "Hello World" > index.html
diode publish -http
And that’s it!
After you’ve run the last command you will see some instructions presenting your new server url.
You can use that URL to share your website with others. And if they open it in a browser they will see:
Now that this is done, you can also go ahead and register a nicer name than the autogenerated hex. For that have a look at Reserve a Domain Name