From 023220f88c93f96497f2705589189ae87a382fd6 Mon Sep 17 00:00:00 2001 From: Dnouv <61188295+Dnouv@users.noreply.github.com> Date: Tue, 14 Jun 2022 18:24:47 +0530 Subject: [PATCH] [IMPROVE] Strapi Setup OOB Experience (#168) Embed default key to improve out of box experience. --- README.md | 6 ++++++ cms/README.md | 2 +- cms/config/server.js | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6f4f80e..742bc374 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,12 @@ Nodejs versioning is managed by [volta](https://docs.volta.sh/guide/). You can i By default, strapi listens on port 1337. If you're using WSL2 on Windows and also running Docker Desktop, port 1337 may not be available on your system. To use port 3000 instead, set the environment variable `PORT` to 3000. +#### If migrating form Strapi v3 to v4, please - + +> Delete the old `.tmp` and `build` folders (if exists). + +> **Optional: Add the `APP_KEYS`, and `JWT_SECRET` environment variables. (For a quick start, you could use the same keys as in `.env.example`) + ``` export PORT=3000 ``` diff --git a/cms/README.md b/cms/README.md index 64c29987..76f25521 100644 --- a/cms/README.md +++ b/cms/README.md @@ -10,7 +10,7 @@ By default, strapi listens on port 1337. If you're using WSL2 on Windows and a > Delete the old `.tmp` and `build` folders (if exists). -> Add the `APP_KEYS`, and `JWT_SECRET` environment variables. (For a quick start, you could use the same keys as in `.env.example`) +> **Optional: Add the `APP_KEYS`, and `JWT_SECRET` environment variables. (For a quick start, you could use the same keys as in `.env.example`) ``` export PORT=3000 diff --git a/cms/config/server.js b/cms/config/server.js index 7df2ba40..f2f9ce2b 100644 --- a/cms/config/server.js +++ b/cms/config/server.js @@ -4,7 +4,7 @@ module.exports = ({ env }) => ({ host: env('HOST', '0.0.0.0'), port: env.int('PORT', 1337), app: { - keys: env.array('APP_KEYS'), + keys: env.array('APP_KEYS', ["km0QgjouyuXrRtyclpqncQ==","eJRdLckHY4J5cOfQNmKs+w==","zHVrFOcuFTLlwsabLJNIaw==","P9XerXlU/TTeIzsOdizoOQ=="]), }, cron: { enabled: true,