项目作者: king-prawns

项目描述 :
Stencil project - Start from scratch
高级语言: TypeScript
项目地址: git://github.com/king-prawns/Stencil-SFS.git
创建时间: 2019-11-11T10:15:34Z
项目社区:https://github.com/king-prawns/Stencil-SFS

开源协议:MIT License

下载


Stencil-SFS

Stencil project - Start from scratch

Installation

  • Install Node.js

Go to Node website

Full fake REST API

  1. $ npm install -g json-server

Usage

  • Clone or Download the project

  • Install dependencies

    1. $ cd my-project
    2. $ npm install
  • Open first command prompt

a) for dev build

  1. $ cd my-project
  2. $ npm start

b) for prod build

  1. $ cd my-project
  2. $ npm run build

Install http-server

A command-line http server

  1. $ npm install -g http-server

then

  1. $ cd my-project\build
  2. http-server
  • Open second command prompt

    1. $ cd my-project\fake_db
    2. $ json-server --watch db.json --port 4000
  • Go to localhost:8080

Conclusion

This is just a simple example, I hope this will help you to understand better Stencil.