Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sobird/guestbook

my guestbook
https://github.com/sobird/guestbook

guestbook nextjs

Last synced: 6 days ago
JSON representation

my guestbook

Awesome Lists containing this project

README

        

This is a starter template for [Learn Next.js](https://nextjs.org/learn).

## pm2
在服务器上全局安装PM2
```bash
npm i -g pm2
```

通过pm2命令行启动

```sh
# pm2 start yarn --name "nextjs" --interpreter bash -- start
pm2 start --name nextjs yarn -- start
pm2 show nextjs
```

通过pm2配置文件启动

```bash
PORT=4000 pm2 start pm2.config.js
```

## 部署Next.js

有两种方式

* 通过 `yarn build && yarn start` 命令行来启动SSR服务
* 构建独立的SSR服务,静态资源分开部署