Reputation: 13
I'd like to host three react web sites in one domain. But each web is heavy. I've heard about the subdomain and subdirectories, but is this done in one file? Or does that mean I'll combine them at hosting stage? (npm start 3 times)
Upvotes: 1
Views: 400
Reputation: 36
You can make sub domains and point to specific directories of your website as api.domain.com points to one directory, dashboard.domain.com points to another directory and redirects to the specific site. Or you can make one directory and place your websites in sub directories and can access them as domain.com/site1 , domain.com/site2 respectively.
How to create a subdomain and point to a certain directory
Upvotes: 1
Reputation: 36
What you're looking for are sub domains, eg:
site1.yourdomain.com
site2.yourdomain.com
site3.yourdomain.com
Each subdomain has a different directory on your web server, or can even point it to another server. You can look into CI/CD to help automate your build and deployment process.
Upvotes: 1