|
@@ -64,24 +64,20 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
|
|
|
## Deploy
|
|
|
### Deploy on server
|
|
|
First, build the app for production:
|
|
|
-
|
|
|
```bash
|
|
|
npm run build
|
|
|
```
|
|
|
|
|
|
-Then, move the static files to standalone folder:
|
|
|
+Then, start the server:
|
|
|
```bash
|
|
|
-mv .next/static .next/standalone/.next
|
|
|
-cp -r ./public .next/standalone/.next/
|
|
|
+npm run start
|
|
|
```
|
|
|
|
|
|
-Finally, start the app:
|
|
|
+If you want to customize the host and port:
|
|
|
```bash
|
|
|
-node .next/standalone/server.js
|
|
|
+npm run start --port=3001 --host=0.0.0.0
|
|
|
```
|
|
|
|
|
|
-If your project needs alternative port or hostname for listening, you can define PORT and HOSTNAME environment variables, before running server.js. For example, `PORT=3000 HOSTNAME=localhost node .next/standalone/server.js`.
|
|
|
-
|
|
|
## Lint Code
|
|
|
If your IDE is VSCode, rename `web/.vscode/settings.example.json` to `web/.vscode/settings.json` for lint code setting.
|
|
|
|