uAdmin the Golang Web Framework #9 Publishing

Abdullah Alrasheed
4 min readNov 14, 2018

--

IMPORTANT (BEFORE YOU START)

If you installed uAdmin before November 14th version 0.1.0-beta.4, please update your uAdmin installation (If you are not sure, just update it anyway):

go get -u github.com/uadmin/uadmin/...

After you do that go to your project’s folder and run:

uadmin prepare

This will update uAdmin templates and static files.

Publishing Your App

So far you have developed this really cool application that you want to show to your your customer or even to the world. Hosting Golang applications on a VPS or a dedicated server can be hard to setup and expensive. For development, you really don’t need this expensive setup. You just want your client to see your application for feedback. We offer FREE hosting for your app while you are developing.

A few limitations here:

  • You have to make sure you application is using sqlite (which is the default DB in uAdmin)
  • Don’t use uadmin.StartSecureServer() you should only use uadmin.StartServer()
  • Don’t use this for doing anything illegal or for spam, hacking, pen-testing, DDoS … etc
  • Your application + data should not exceed 1GB
  • Daily bandwidth 5GB
  • Your application will expire in 24 hours if you didn’t publish anything new to it.
  • PLEASE change your admin password after you publish your application or you will be putting your app and our servers at risk.

That’s is. If you want to publish the application that you have been working on so far, make sure you return it to the old uadmin.StartServer().

Then go to your app’s folder and type:

uadmin publish

It will ask you for three fields:

  • Email: Your email
  • Sub domain: The name of the sub domain that you want your application to be published to e.g. todo will publish it to https://todo.uadmin.io. You can just press Enter and it will generate a random domain name for you.
  • Port: If you changed your port using uadmin.Port = X then provide the port that you used

This way you can publish your application in ~1 minute and give access to your client or team to see your work and give you feedback.

If you need to update your application, just use the same command again:

uadmin publish

Notice that the second time you you publish the same application it does that much faster. It only takes a few seconds the second time and it does not ask for any information about your app anymore. Every time you publish your app again, your app’s expiry is reset for 24 hours from your last publish.

You application is now live, you can access it using the URL you have at the end of uadmin publish output. We made sure you have SSL to protect your traffic to your app.

You will now notice that you have a new file in your app’s folder .uproj which contains some information about your app.

{"domain":"kr62","port":"8080","uid":"NfSD3qBsgwYdWlwei-okLQI"}

You should know that this is project specific data. User the data is available in your home directory in a file called .uadmin:

{"email":"abdullah@integranet.ph","token":"PW6wOdKGMZue0UfasffzR"}

This file contains your email which is to some level your username and your token which is kind of a password for your account. This way you can make sure your sub domains and your apps will not be overwritten by some else.

For now we don’t have a hosting service that holds applications for extended hosting (months or years). If you need to keep your app published for longer than 24 hours without publishing again, contact me email at abdullah@uadmin.io and I’ll extend your app’s expiry date for a week.

Hopefully soon we will setup the right servers to keep your application for longer and give you more storage and bandwidth and I’ll keep you posted regarding that.

Congrats you application is now live for the world to see. Share your cool apps with me and with others to see your creative work.

In Part 10 we will talk about schema basics.

--

--