Stencil project - Start from scratch
- Install Node.js
Go to Node website
- Install json-server
Full fake REST API
$ npm install -g json-server
-
Clone or Download the project
-
Install dependencies
$ cd my-project
$ npm install
- Open first command prompt
a) for dev build
$ cd my-project
$ npm start
b) for prod build
$ cd my-project
$ npm run build
Install http-server
A command-line http server
$ npm install -g http-server
then
$ cd my-project\build
http-server
- Open second command prompt
$ cd my-project\fake_db
$ json-server --watch db.json --port 4000
- Go to localhost:8080
This is just a simple example, I hope this will help you to understand better Stencil.