npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

ssr

3.0.0 • Public • Published

tudou

Install

$ npm i tudou -g

Usage

  • build
$ ssr build

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

  • run server
'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

Keywords

none

install

npm i ssr

Downloadsweekly downloads

118

version

3.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability