Skip to content

Commit

Permalink
add build folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrgg committed Jan 1, 2021
1 parent e03c2bf commit 2f0ae09
Show file tree
Hide file tree
Showing 30 changed files with 212 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules/
.env
build/
.env
Binary file added build/apollo-client.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"files": {
"main.js": "/static/js/main.4a3c9992.chunk.js",
"main.js.map": "/static/js/main.4a3c9992.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.c8a21426.js",
"runtime-main.js.map": "/static/js/runtime-main.c8a21426.js.map",
"static/js/2.72c194fc.chunk.js": "/static/js/2.72c194fc.chunk.js",
"static/js/2.72c194fc.chunk.js.map": "/static/js/2.72c194fc.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.33c54d947f4722bb0923e9fb239666f8.js": "/precache-manifest.33c54d947f4722bb0923e9fb239666f8.js",
"service-worker.js": "/service-worker.js",
"static/js/2.72c194fc.chunk.js.LICENSE.txt": "/static/js/2.72c194fc.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.c8a21426.js",
"static/js/2.72c194fc.chunk.js",
"static/js/main.4a3c9992.chunk.js"
]
}
Binary file added build/authors-page.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/books-page.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/books-paginate.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/edit-user-page.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/favicon.ico
Binary file not shown.
Binary file added build/fso.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/genre-filter-books.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/graphql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.gstatic.com"/><link href="https://fonts.googleapis.com/css2?family=Rock+Salt&Roboto:300,400,500,700&display=swap" rel="stylesheet"/><title>Library: React, GraphQL & ApolloClient</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,f,l=r[0],i=r[1],a=r[2],c=0,s=[];c<l.length;c++)f=l[c],Object.prototype.hasOwnProperty.call(o,f)&&o[f]&&s.push(o[f][0]),o[f]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},o={1:0},u=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var l=this.webpackJsonpfrontend=this.webpackJsonpfrontend||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var p=i;t()}([])</script><script src="/static/js/2.72c194fc.chunk.js"></script><script src="/static/js/main.4a3c9992.chunk.js"></script></body></html>
Binary file added build/login-page.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
22 changes: 22 additions & 0 deletions build/precache-manifest.33c54d947f4722bb0923e9fb239666f8.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "8d9ef894da4481cc821134bd8855f6d9",
"url": "/index.html"
},
{
"revision": "b2e77ce6d06bffb6c8d5",
"url": "/static/js/2.72c194fc.chunk.js"
},
{
"revision": "27e28cccc1ec422e68316fd29acd149a",
"url": "/static/js/2.72c194fc.chunk.js.LICENSE.txt"
},
{
"revision": "ad7b5dd7a43505977a41",
"url": "/static/js/main.4a3c9992.chunk.js"
},
{
"revision": "2747b914e9a60db2276f",
"url": "/static/js/runtime-main.c8a21426.js"
}
]);
Binary file added build/recommendations-page.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
39 changes: 39 additions & 0 deletions build/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/

importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/precache-manifest.33c54d947f4722bb0923e9fb239666f8.js"
);

self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});

workbox.core.clientsClaim();

/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});

workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {

blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
});
3 changes: 3 additions & 0 deletions build/static/js/2.72c194fc.chunk.js

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions build/static/js/2.72c194fc.chunk.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/

/** @license React v0.19.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.14.0
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions build/static/js/2.72c194fc.chunk.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions build/static/js/main.4a3c9992.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.4a3c9992.chunk.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions build/static/js/runtime-main.c8a21426.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/static/js/runtime-main.c8a21426.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions client/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export default function Header({ token, setToken }) {
</IconButton>
</Link>
<Link to="/authors" className={classes.menuButton}>
<IconButton className={classes.button} edge="" color="inherit">
<IconButton
className={classes.button}
edge="start"
color="inherit"
>
<PersonOutlineRounded />
</IconButton>
</Link>
Expand All @@ -93,9 +97,9 @@ export default function Header({ token, setToken }) {
<>
<Link to="/user" className={classes.menuButton}>
<IconButton
edge=""
className={classes.button}
color="inherit"
edge="start"
>
<FaceRounded />
</IconButton>
Expand Down
11 changes: 10 additions & 1 deletion client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ const authLink = setContext((_, { headers }) => {
};
});

const httpLink = new HttpLink({ uri: "http://localhost:4000/api" });
console.log(window.location, process.env);

const API_URI =
process.env.NODE_ENV === "development"
? `http://localhost:4000/api`
: `${window.location.host}/api`;

const httpLink = new HttpLink({
uri: API_URI,
});

const client = new ApolloClient({
cache: new InMemoryCache(),
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ app.use(cors());
app.use(express.static("build"));
server.applyMiddleware({ app, path: "/api" });

app.listen({ port: process.env.PORT || 4000 }, () =>
const PORT = process.env.PORT || 4000;

app.listen({ port: PORT }, () =>
console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`)
);

0 comments on commit 2f0ae09

Please sign in to comment.