UNPKG

adfs_login_react_nds

Version:

This is a library that provides the necessary functions to install, configure, and connect a JavaScript application with Active Directory Federation Service. It allows for seamless integration with ADFS by providing the necessary parameters and dependenci

28 lines (21 loc) 712 B
const express = require("express"); const https = require("https"); const fs = require("fs"); const next = require("next"); const dev = process.env.NODE_ENV !== "production"; const app = next({ dev }); const handle = app.getRequestHandler(); const httpsOptions = { key: fs.readFileSync("C:\git\libs\adfs_login_react_nds\certs\localhost.key"), cert: fs.readFileSync("C:\git\libs\adfs_login_react_nds\certs\localhost.cert") }; app.prepare().then(() => { const server = express(); server.get("*", (req, res) => { return handle(req, res); }); https.createServer(httpsOptions, server).listen(3000, err => { if (err) throw err; console.log("> Ready on https://localhost:3000"); }); });