项目作者: king-prawns

项目描述 :
Preact project - Start from scratch
高级语言: JavaScript
项目地址: git://github.com/king-prawns/Preact-SFS.git
创建时间: 2018-12-01T18:35:47Z
项目社区:https://github.com/king-prawns/Preact-SFS

开源协议:MIT License

下载


Preact-SFS

Preact 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

Features

Conclusion

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