您的位置:首页 > Web前端 > JavaScript

[Poi] Use Poi to Build an Index.js with Modern JavaScript Features

2018-01-02 17:40 567 查看
Poi can easily launch an
index.js
file simply by running the
poi
command. This will launch a dev-server and automatically reload whenever you make changes. You can also
npm install
any package you need and
import
it right away.

Install:

npm install -g poi


Code:

// src/index.js

import {Observable} from 'rxjs';

Observable.intervable(1000).subscribe(
i = > document.getElementById("app").innerHTML = `
<h1>{i}</h1>
`
)


Run:

poi src/index --port 3000
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐