Giter Club home page Giter Club logo

multidomain-server's Introduction

A webserver that handles multiple domains with custom endpoints

(this readme is chatgpt generated, too lazy to make my own lmfao)

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/justDarian/multidomain-server.git
  2. Navigate to the project directory:

    cd multidomain-server
  3. Install the required dependencies using npm:

    npm install

Configuration

  • Configure your endpoints in the routes.js file.
  • Organize your site content within the sites folder. You can create subfolders for each site.

Usage

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.

Custom Endpoints

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

Adding More Sites

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.

License

This project is licensed under something.


If you have any issues or suggestions, feel free to open an issue.

multidomain-server's People

Contributors

justdarian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.