how to change strapi port

/home/stax-api.workdaytraining.top/public_html/stax-api


root@vmi728455:/home/stax-api.workdaytraining.top/public_html/stax-api# cat .env

HOST=0.0.0.0

PORT=1339

APP_KEYS=FQvObQaSR2OTcGELsB5OtA==,Pgic8HSCUBL4VQqbu5Rl1g==,nCesqteZqgWRyyrRCwDlTA==,DNFXPA+8VAdYrSVrQGOxFQ==

API_TOKEN_SALT=yugef/wBi20YraZCtlyZCQ==

ADMIN_JWT_SECRET=OXnlNnUa4gosIS17Vc6QpA==

JWT_SECRET=re4GZkj544v3cSG5XF16xQ==



root@vmi728455:/home/stax-api.workdaytraining.top/public_html/stax-api# node server.js


 Project information


┌────────────────────┬──────────────────────────────────────────────────┐

│ Time               │ Tue Nov 29 2022 23:21:41 GMT-0500 (Eastern Stan… │

│ Launched in        │ 7797 ms                                          │

│ Environment        │ development                                      │

│ Process PID        │ 1322229                                          │

│ Version            │ 4.2.2 (node v16.18.1)                            │

│ Edition            │ Community                                        │

└────────────────────┴──────────────────────────────────────────────────┘


 Actions available


Welcome back!

To manage your project 🚀, go to the administration panel at:

http://localhost:1339/admin



 For Strapi v4, this seem to work, might not be the best way.

config/server.js

module.exports = ({ env }) => ({
  host: env("HOST", "0.0.0.0"),
  port: 1338,
  // port: env.int('PORT', 1337),
  app: {
    keys: env.array("APP_KEYS"),
  },
});

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation