1.1.6 • Published 3 years ago

express-subdomains-middleware v1.1.6

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

express-subdomain

A script that allows using subdomains in express.js

Example

import {subdomain} from "express-subdomains-middleware";
import express from 'express';

const app = express();


const FrontEndRouter = subdomain("www",app);
const BackEndRouter = subdomain("api", app);


FrontEndRouter.static("./static");

BackEndRouter.get("/example", (req, res) => {
    res.json({
        text: 'This is a backend path'
    })
})

app.listen(3000);
1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago