Skip to content

Instantly share code, notes, and snippets.

View Athelian's full-sized avatar
🎯
Focusing

Eliot Austin-Forbes Athelian

🎯
Focusing
View GitHub Profile
@Athelian
Athelian / flow---config-overrides.js
Last active November 7, 2022 11:47
config-overrides.js
const path = require("path");
module.exports = function override(config, env) {
const babelRule = config.module.rules[1].oneOf.find(
(rules) => rules.include === path.resolve(__dirname, "./src")
);
babelRule.include = [
babelRule.include,
path.resolve(__dirname, "../typescript/src")
];
We couldn’t find that file to show.
{
...
"scripts": {
"start": "PORT=3001 react-app-rewired start",
},
}
@Athelian
Athelian / package.json
Last active November 6, 2022 14:43
direct import pkg.json
{
"scripts": {
"start": "react-app-rewired start"
}
}
@Athelian
Athelian / server.js
Last active September 21, 2021 13:41
frontend server target build index
const express = require("express");
const fs = require("fs");
const path = require("path");
const app = express();
const port = process.env.PORT || 8080;
const filePath = path.resolve(__dirname, "./build", "index.html");
// Home page route
app.get("/", function (request, response) {
// Read in index.html
@Athelian
Athelian / homepage.ejs
Last active September 21, 2021 13:41
Benign frontend server
< !DOCTYPE html >
<html>
<head>
<!-- web crawlers will read this -->
<meta name="og:title" property="og:title" content="<%= title %>" />
<script>
// browser windows will activate this
window.location.href = "<%= redirectUrl %>";
</script>
</head>