tudou

1.2.0 • Public • Published

ssr-cli

Install

$ npm i tudou -g

Usage

  • start csr and ssr
$ ssr start
  • build
$ ssr build

build 命令将根据 yaml 配置文件中的路由进行打包。支持多路由配置。

'use strict'
 
const path = require('path')
 
const App = require('faas-runtime')('egg', async (ctx, next) => {
  // add your runtime middware here
  ctx.ssrRender = require('../../index')
  app.use(require('koa-static')(path.join(__dirname, './app/render/dist')))
  await next()
})
 
const app = new App('./app')
 
app.listen(3000)
$ open http://localhost:3000/xxx

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    1
  • 1.1.0
    0
  • 1.0.0
    0
  • 0.0.2
    0

Package Sidebar

Install

npm i tudou

Weekly Downloads

1

Version

1.2.0

License

none

Unpacked Size

50.8 kB

Total Files

42

Last publish

Collaborators

  • shen2