eo

esm-optimize

Create Serverless SSR App

Showing:

Popularity

Downloads/wk

1

GitHub Stars

13

Maintenance

Last Commit

3d ago

Contributors

2

Package

Dependencies

7

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

create-ssr-app

download

Fast create an server-side-render app contains both serverless ssr and egg-react-ssr realized by dclone

create-ssr-app 用于快速创建 ssr 服务端渲染应用。可创建基于 ssr 框架 的开箱即用的服务端渲染应用,以及 egg-react-ssr 骨架类型的应用。如无特殊需求,我们推荐创建基于 ssr 框架 的开箱即用的服务端渲染应用

创建应用

我们提供了两种方式来快速创建应用

手动选择(推荐使用)

$ npm init ssr-app my-ssr-project
$ cd my-ssr-project
$ npm install
$ npm start

手动选择需要创建的应用类型 基于 ssr 框架

命令行指定模版类型

通过该方式来手动制定需要创建的模版类型。同时支持创建基于 ssr 框架 的开箱即用的服务端渲染应用,以及egg-react-ssr 骨架类型的应用

   const templateMap: TemplateMap = {
    'spa': 'https://github.com/ykfe/ssr/tree/dev/example/midway-react-ssr',
    'serverless-react-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/midway-react-ssr',
    'serverless-vue-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/midway-vue-ssr',
    'midway-react-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/midway-react-ssr',
    'midway-vue-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/midway-vue-ssr',
    'midway-vue3-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/midway-vue3-ssr',
    'nestjs-react-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/nestjs-react-ssr',
    'nestjs-vue-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/nestjs-vue-ssr',
    'nestjs-vue3-ssr': 'https://github.com/ykfe/ssr/tree/dev/example/nestjs-vue3-ssr',
    'ssr-with-js': 'https://github.com/ykfe/egg-react-ssr/tree/dev/example/ssr-with-js',
    'ssr-with-ts': 'https://github.com/ykfe/egg-react-ssr/tree/dev/example/ssr-with-ts',
    'ssr-with-antd': 'https://github.com/ykfe/egg-react-ssr/tree/dev/example/ssr-with-antd',
    'ssr-with-dva': 'https://github.com/ykfe/egg-react-ssr/tree/dev/example/ssr-with-dva'
  }
$ npm init ssr-app my-ssr-project --template=serverless-react-ssr
$ npm init ssr-app my-ssr-project -- --template=midway-react-ssr # when Node.js >= 15 || NPM >= 7
$ cd my-ssr-project
$ npm install
$ npm start

Publish On NPM

$ npm version patch|minor|major
$ git push origin master # github ci will publish package on NPM automatically

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial