Strapi Version: latest
Operating System: windows 10
Node Version: 14.x
NPM Version: 6.x
Yarn Version: 1.22
Im looking to start using Strapi on my clients projects, but since i dont have much backend experience id like to ask you that if its possible to use Strapi just like wordpress.
Basically id like to have strapi on same server and same domain.
anysite.com/ ==> frontend
anysite.com/admin ==> cms
I have this question because i see that strapi runs on a different port (1337), while front end (3000). Is Strapi built for having the host separated? Does strapi make sense for this kind of website?
Thanks for reading, have a good day everyone.
Yes, you can do that. Strapi is nodejs based though, and so requires its own nodejs instance on the server.
Personally I have a DO droplet running ubuntu and pm2, and serve strapi from api.domain.com while the frontend lives on domain.com. You can spin up your apps exactly like you do on localhost (npm start etc) and then use NGINX as a reverse proxy.
Here is a good guide if you are looking to do the same. Strapi also has a guide.
edit: I missed your question. Strapi is a headless cms, yes. It doesn’t render its own frontend. Instead you can build whatever frontend you want, and consume content from strapi via the rest or graphql api. But you can still host them both on the same server if you want.
please help i have exact same question but still its too difficult to understand exact process
i have plesk server for hosting its my company server which i have to use it for i have access to a subdomain where i have to host my app i have added
frontend build files in - front end folder
strapi files in - backend folder (which contain all files including build of strapi )
to run this app i have no idea what is the correct way
like i can run this by creating server.js file and node application and adding http-proxy-middleware pkg init but getting error from strapi (frontend running perfectly )
also found that proxy work on nginx but 0 idea how to set up what the name should give
like i got this /etc/nginx/sites-available/example.com but where do i create ? like at very root level where all website relays or at my project folder where i have frontend and backend folder
Thank in Advance for you valuable help