Setup Demo on Local

Note: dist/ folder contains the built distribution (production) version, which is for demo purpose only

You need to put the files on a server to run it. Here we told about how to
build a server locally.

You can build a locally server using WAMP or MAMP (if you
uses PHP). Also it’s pretty easy to build one with Python or Ruby (if you prefer Python or
Ruby). And here we’ll build a local server with NodeJS

Preparation:

You’ll need to install Node.js >=v6.5.0 (NPM comes along with
it) and node-static (a NPM package)

Steps:

It’s easy if you are familiar with Node. Download
Node.js here
then install it, and install node-static package with one command
line

$ npm install -g node-static

The usage of node-static is simple. Just enter the “dist” directory with command line

$ cd dist/

and type:

$ static

It’ll return something like this:

serving "." at http://127.0.0.1:8080

Then you can view the template on http://127.0.0.1:8080 with your browser

Note: Because the dist/ folder built with webpack uses absolute
path, you need to run it from root path, if not, please compile a new dist/ with a new
publicPath variable and run `npm run build`.