4kkoia
Last Updated: July 28, 2016
·
179
· alidavut
Img 20130106 005802

Deploy single page applications using Push State

How to deploy your static web page using http://pushstate.io?

Installing CLI

You need to install Push State CLI globally using npm.
npm install pushstate -g

Deploy Some Directory

pushstate deploy <yourDirectory>

The CLI will ask you to login or sign up. Then you will need to create an app or select an app already created. Push State will deploy your files on your-app-name.apps.pushstate.io.

Examples

Deploy current directory:

pushstate deploy .

Assume that we are using webpack and it compiles our files to ./dist folder. Just you need to enter you project directory and type this command:

pushstate deploy ./dist

Custom Domain

Adding a custom domain

Type this command to add a custom domain:

pushstate domains:add

Then you will need to select an app to attach custom domain.

Assume that we have an app named test-app. After you set the custom domain name you will need to add a CNAME record which points to test-app.apps.pushstate.io. You can find your domain service and instruction on Google's amazing help documentation: https://support.google.com/a/topic/1615038

Removing custom domain

pushstate domains:remove
Say Thanks
Respond