1.1.6 • Published 1 year ago

express-subdomains-middleware v1.1.6

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.6

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago