Template to host static files without backend logic.
To run this on your local machine, run the steps below:
- You need to have both nodejs and npm (or yarn) installed. For this we will be using npm.
- Firstly clone this github repository:
$ git clone https://github.com/jexia/static-apphosting-template.git
- Then we need to move into the directory of the git repository:
$ cd static-apphosting-template
- After this we need to install the node modules:
$ npm install
- Once they have installed, we can now start our development web server:
$ npm run dev
If this program doesn't run on your local machine, you can edit the dev
command within package.json
, which looks like:
"dev": "http-server ./dist -a localhost -p 8080"
If will change the port from 8080
to another port such as 5678
which is normally free for use, you will be able to then visit this in the browser.
Another issue you may come across, such as "This page isn't working", you may need to access http://localhost:8080/index.html
directly, instead of http://localhost:8080
.