Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up App Keys #1

Open
0x00trust opened this issue May 21, 2022 · 3 comments
Open

Setting up App Keys #1

0x00trust opened this issue May 21, 2022 · 3 comments

Comments

@0x00trust
Copy link

0x00trust commented May 21, 2022

cd backend
npm install
npm run develop

`npm run develop

[email protected] develop
strapi develop

Building your admin UI with development configuration ...
Admin UI built successfully

╭──────────────────────────────────────────────────────────────────────────────╮│ ││ A new version of Strapi is available 4.1.7 → 4.1.11 ││ Check out the new releases at: https://github.com/strapi/strapi/releases ││ │╰──────────────────────────────────────────────────────────────────────────────╯

[2022-05-21 13:41:54.829] debug: ⛔️ Server wasn't able to start properly.
[2022-05-21 13:41:54.831] error: Middleware "strapi::session": App keys are required. Please set app.keys in config/server.js (ex: keys: ['myKeyA', 'myKeyB'])
Error: Middleware "strapi::session": App keys are required. Please set app.keys in config/server.js (ex: keys: ['myKeyA', 'myKeyB'])
at instantiateMiddleware (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/services/server/middleware.js:12:11)
at resolveMiddlewares (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/services/server/middleware.js:56:18)
at registerApplicationMiddlewares (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/services/server/register-middlewares.js:66:29)
at async Object.initMiddlewares (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/services/server/index.js:99:7)
at async Strapi.bootstrap (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/Strapi.js:403:5)
at async Strapi.load (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/Strapi.js:415:5)
at async Strapi.start (/home/leo/Desktop/custom-controllers-strapi/backend/node_modules/@strapi/strapi/lib/Strapi.js:163:9)`

@ravgeetdhillon
Copy link
Owner

ravgeetdhillon commented May 22, 2022

@0x00trust If you look in this file, you need to set APP_KEYS environment variable in your .env file.

So, in the .env file, just add the following line:

APP_KEYS=jP8pb1lYsAhnmURarewxhA==,34xnLMYHY5jiU7ONTstTqQ==

You can change these random strings according to your own choice.

You can also use a tool like Random Key Generator for creating keys.

@ravgeetdhillon ravgeetdhillon changed the title Error Setting up App Keys May 22, 2022
@ravgeetdhillon ravgeetdhillon pinned this issue May 22, 2022
@0x00trust
Copy link
Author

Thank you
Let me try again

@0x00trust
Copy link
Author

Hi,
I have got this template
https://github.com/0x00trust/bholdus-web
Can you help me install
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants