Skip to content

Commit cc0f984

Browse files
author
Redback
committed
Added Heroku Specs
1 parent 36660f8 commit cc0f984

File tree

7 files changed

+39
-43
lines changed

7 files changed

+39
-43
lines changed

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: yarn run start-prod

express.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
const express = require('express');
2-
const app = express();
3-
const portNumber = 3000;
2+
const throng = require('throng');
3+
44
const sourceDir = 'dist';
5+
const PORT = 3000;
6+
const WORKERS = process.env.WEB_CONCURRENCY || 1;
7+
8+
throng({
9+
workers: WORKERS,
10+
lifetime: Infinity
11+
}, start);
512

6-
app.use(express.static(sourceDir));
13+
function start() {
14+
var app = express();
15+
app.use(express.static(sourceDir));
16+
17+
app.listen(PORT, () => {
18+
console.log(`Express web server started: http://localhost:${PORT}`);
19+
console.log(`Serving content from /${sourceDir}/`);
20+
});
21+
}
722

8-
app.listen(portNumber, () => {
9-
console.log(`Express web server started: http://localhost:${portNumber}`);
10-
console.log(`Serving content from /${sourceDir}/`);
11-
});

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,31 @@
3232
"@types/react-dom": "^16.0.9",
3333
"awesome-typescript-loader": "^5.2.1",
3434
"babel-loader": "^8.0.4",
35+
"bootstrap": "^4.1.3",
36+
"classnames": "^2.2.6",
3537
"css-loader": "^1.0.1",
3638
"express": "^4.16.4",
3739
"file-loader": "^2.0.0",
3840
"html-webpack-plugin": "^3.2.0",
3941
"image-webpack-loader": "^4.5.0",
4042
"jest": "^23.6.0",
43+
"json-loader": "^0.5.7",
4144
"node-sass": "^4.10.0",
4245
"react": "^16.6.0",
4346
"react-addons-test-utils": "^15.6.2",
4447
"react-dom": "^16.6.0",
4548
"react-hot-loader": "^4.3.12",
49+
"react-scroll": "^1.7.10",
4650
"sass-loader": "^7.1.0",
4751
"style-loader": "^0.23.1",
52+
"throng": "^4.0.0",
4853
"tslint": "^5.11.0",
4954
"typescript": "^3.1.6",
5055
"uglifyjs-webpack-plugin": "^2.0.1",
5156
"webpack": "^4.25.1",
5257
"webpack-cli": "^3.1.2",
5358
"webpack-dev-middleware": "^3.4.0",
5459
"webpack-dev-server": "^3.1.10",
55-
"webpack-merge": "^4.1.4",
56-
"bootstrap": "^4.1.3",
57-
"classnames": "^2.2.6",
58-
"json-loader": "^0.5.7",
59-
"react-scroll": "^1.7.10"
60+
"webpack-merge": "^4.1.4"
6061
}
6162
}

src/components/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from "react";
22
import Hero from "./Hero";
33
import Navbar from "./Navbar";
44
import Projects from "./Projects";
5-
import ProjectSelector from "./ProjectSelector";
65
import AllProjects from "./projects/AllProjects";
76
import Contact from "./Contact";
87
import Footer from "./Footer";

src/components/Navbar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from "react";
2-
import Scrollspy from 'react-scrollspy';
32
import {Link, animateScroll} from 'react-scroll';
43
import classNames from 'classnames';
54

src/components/ProjectSelector.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

yarn.lock

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ class-utils@^0.3.5:
20772077
isobject "^3.0.0"
20782078
static-extend "^0.1.1"
20792079

2080-
classnames@^2.2.5, classnames@^2.2.6:
2080+
classnames@^2.2.6:
20812081
version "2.2.6"
20822082
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
20832083
integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==
@@ -5988,6 +5988,11 @@ lodash.debounce@^4.0.8:
59885988
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
59895989
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
59905990

5991+
lodash.defaults@^4.0.1:
5992+
version "4.2.0"
5993+
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
5994+
integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
5995+
59915996
lodash.escape@^3.0.0:
59925997
version "3.2.0"
59935998
resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
@@ -7471,7 +7476,7 @@ prompts@^0.1.9:
74717476
kleur "^2.0.1"
74727477
sisteransi "^0.1.1"
74737478

7474-
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2:
7479+
prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2:
74757480
version "15.6.2"
74767481
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
74777482
integrity sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==
@@ -8917,6 +8922,13 @@ throat@^4.0.0:
89178922
resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
89188923
integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=
89198924

8925+
throng@^4.0.0:
8926+
version "4.0.0"
8927+
resolved "https://registry.yarnpkg.com/throng/-/throng-4.0.0.tgz#983c6ba1993b58eae859998aa687ffe88df84c17"
8928+
integrity sha1-mDxroZk7WOroWZmKpof/6I34TBc=
8929+
dependencies:
8930+
lodash.defaults "^4.0.1"
8931+
89208932
through2-filter@^2.0.0:
89218933
version "2.0.0"
89228934
resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"

0 commit comments

Comments
 (0)