(this readme is chatgpt generated, too lazy to make my own lmfao)
-
Clone this repository to your local machine:
git clone https://github.com/justDarian/multidomain-server.git
-
Navigate to the project directory:
cd multidomain-server
-
Install the required dependencies using npm:
npm install
- Configure your endpoints in the
routes.js
file. - Organize your site content within the
sites
folder. You can create subfolders for each site.
Start the webserver using the following command:
node index.js
This will start the server, and you can access it by navigating to http://localhost:80 in your web browser.
Define your custom endpoints in the routes.js
file. You can modify the array to add objects per each endpoint. Each Object must require a domain, endpoint, and callback. The callback function has 3 arguments: req, res, and next
Organize your site content within the sites
folder. Each subfolder can represent a different site. For example:
sites/
├── site1.com/
│ ├── index.html
│ ├── styles/
│ │ └── style.css
│ └── images/
│ └── logo.png
├── site2.com/
│ ├── index.html
│ └── scripts/
│ └── app.js
└── another-site.com/
└── ...
Feel free to customize the structure based on your needs.
This project is licensed under something.
If you have any issues or suggestions, feel free to open an issue.