-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3836 from SailingSteve/steveWebAppFeb16-318pm
Updated webpack to use wevotedeveloper.com SSL if configured
- Loading branch information
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* eslint-disable */ | ||
|
||
// start the express server | ||
|
||
// invoke: | ||
// node serverWevotedeveloper.js | ||
|
||
const express = require("express"); | ||
const app = express(); | ||
const fs = require("fs"); | ||
const https = require("https"); | ||
const path = require("path"); | ||
const webAppConfig = require("./src/js/config"); | ||
|
||
const port = 3000; | ||
const opts = { redirect: true }; | ||
const hostname = "wevotedeveloper.com"; | ||
|
||
app.use("/", express.static("build", opts)); | ||
app.all("*", (req, res) => res.sendFile(__dirname + "/build/index.html")); | ||
|
||
const certOptions = { | ||
key: fs.readFileSync(path.resolve(__dirname + "/src/cert/wevotedeveloper.com_key.txt")), | ||
cert: fs.readFileSync(path.resolve(__dirname + "/src/cert/wevotedeveloper.com.crt")), | ||
}; | ||
|
||
const server = https.createServer(certOptions, app).listen(port, function () { | ||
console.log("INFO: https server started", new Date()); | ||
console.log(`INFO: Server is at https://${hostname}:${port}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { renderLog } from '../../common/utils/logging'; | ||
|
||
|
||
// React functional component example | ||
export default function StorybookRedirect () { | ||
renderLog('StorybookRedirect functional component'); | ||
|
||
return ( | ||
<a href="/storybook?path=/docs/design-system--docs">Redirect to Html page</a> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters