Demo app I built to display information from a mock database depending on the subdomain. This basic concept can be used to implement multi-tenant architecture into any app.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
For more information read my blog post about multi-tenant architecture. To get a local copy up and running follow these simple steps.
- Node.js
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/raymondkneipp/multi-tenant-via-subdomain.git
- Install NPM packages
npm install
- Start local server
npm run dev
Visiting different subdomains will display different information from a mock database.
URL | Results |
---|---|
http://localhost:3000 | default page |
http://rfkquery.localhost:3000 | @rfkquery page |
http://wesbos.localhost:3000 | @wesbos page |
http://stolinski.localhost:3000 | @stolinski page |
http://does.not.exist.localhost:3000 | error page |
http://does-not-exist.localhost:3000 | error page |
For more information about creating a multi-tenant app visit the following links
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Raymond Kneipp - @rfkquery - hello@raymondkneipp.com
Project Link: https://github.com/raymondkneipp/multi-tenant-via-subdomain