npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

ssr

3.4.5 • Public • Published

ssr-cli

Install

$ npm i ssr -g

Usage

  • start csr and ssr
// example/faas/app
$ ssr start
  • build
// example/faas/app
$ 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

Keywords

none

install

npm i ssr

Downloadsweekly downloads

284

version

3.4.5

license

none

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability