Appstax Hosting allows you to easily upload your static web application to an appstax.io domain.
Hostingin the admin UI (Settings / Components)
Start by creating an empty directory and
cd you way into it on the command line. Then run::
You will first be asked to log in. Type the email and password you used when signing up.
Next, you are asked to select which app you want to configure. If you only have one app it will be automatically selected for you.
You will be asked to choose the subdomain name to host your files. You can type in any name you want, as long as it's available and valid as a subdomain. If you choose
myproject, then your web app will become available at http://myproject.appstax.io/
appstax init has finished you will have the following:
appstax.conffile, which contains the app key for your selected app, as well as the name of the directory that will be deployed later.
publicdirectory (will use the name you selected earlier)
You can change the name of the
public directory to anything you want, as long as you also update the
publicDir property in
appstax command-line tool is designed to work well with modern front end development tools. If you use a build tool, just configure it to use the
public directory as the build target, and this will be the only directory uploaded when you deploy. All your source files like a
src directory and your
gulpfile.js etc. will remain local to your computer.
Now you are ready to share your app with the world! Run this command:
appstax deploy public
All the contents of your
public directory will be packaged and uploaded to your chosen subdomain. When it is done, open your web browser and enjoy your work.
We upload the entire public directory every time you deploy, and it replaces all the content that was deployed before. This way, if you remove a file from your local directory, it will be gone from our servers the next time you deploy. To remove your site, deploy an empty directory.
When you log in, a session token is stored in your computers home directory. This way you won't have to log in every time you want to deploy updated files. But if you are on a shared computer or simply don't like to have open sessions, you can simply run
appstax logout and the session will be terminated. You will be asked for your email and password the next time you want to deploy.
When you ran
appstax init above, you were asked to provide a subdomain name for your app.
If you already have a domain name that you would like to use for your app, then you need to follow a three-step process:
www.example.comto map to
example.appstax.io, then make sure you specify exactly
www.example.comas the custom domain name, and exactly
example.appstax.ioas the pointed to domain name. NOTE: It may take some time before this mapping takes effect.
NOTE: steps 2 and 3 must be performed in the AppStax Admin UI.
Because your app's static files is downloaded from the subdomain
*.appstax.io or a custom domain (e.g.,
www.example.com), these domains must be defined as allowed origins for your app. AppStax does this for you whenever you specify a subdomain or a custom domain.
In addition, to support running your app locally during development and interacting with the AppStax backend, we also enable
localhost:9001 by default.
If you plan on running your app from any other domain, or on a different port on localhost, while also interacting with AppStax you must add these domains to the list of allowed origins.