I added inside my .env file:
HOST=0.0.0.0
PORT=1338
and it runs
> my-strapi-project@0.1.0 start /home/srv43578/cms
> strapi start
Project information
┌────────────────────┬──────────────────────────────────────────────────┐
│ Time │ Tue Mar 14 2023 19:09:16 GMT+0100 (czas środkow… │
│ Launched in │ 779 ms │
│ Environment │ development │
│ Process PID │ 3216673 │
│ Version │ 4.7.1 (node v14.20.1) │
│ Edition │ Community │
│ Database │ sqlite │
└────────────────────┴──────────────────────────────────────────────────┘
Actions available
Welcome back!
To manage your project 🚀, go to the administration panel at:
http://codepage.pl/admin
To access the server ⚡️, go to:
http://codepage.pl
but when I try to enter my /admin page the result is 404 error.
While being inside my page console.log says
GET http://codepage.pl/api/restaurants?fields=name,description&populate=image 503 (Service Unavailable)
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
and still the result of command node server.js is:
[cms (14)] [srv43578@h23 cms]$ node server.js
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'strapi'
Require stack:
- /home/srv43578/cms/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/home/srv43578/cms/server.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/srv43578/cms/server.js' ]
}