This file contains hidden or 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
| # starting from a clean state | |
| FROM node:12-stretch-slim | |
| WORKDIR /docker-react-nginx | |
| COPY --from=test /docker-react-nginx/build . | |
| CMD ["node", "server.js"] |
This file contains hidden or 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
| ENV NODE_ENV production | |
| # build client JS and server | |
| RUN yarn build | |
| RUN yarn build:server |
This file contains hidden or 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
| COPY . . |
This file contains hidden or 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
| COPY package.json yarn.*lock ./ | |
| RUN yarn install --frozen-lockfile |
This file contains hidden or 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
| FROM node:12-stretch-slim as test | |
| WORKDIR /docker-react-nginx |
This file contains hidden or 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
| root@726b2a193270:/# ls -al | |
| total 76 | |
| drwxr-xr-x 1 root root 4096 Jun 20 11:21 . | |
| drwxr-xr-x 1 root root 4096 Jun 20 11:21 .. | |
| -rwxr-xr-x 1 root root 0 Jun 20 11:21 .dockerenv | |
| drwxr-xr-x 2 root root 4096 Apr 22 00:00 bin | |
| drwxr-xr-x 2 root root 4096 Feb 1 17:09 boot | |
| drwxr-xr-x 5 root root 360 Jun 20 11:22 dev | |
| drwxr-xr-x 19 root root 608 Jun 18 12:02 docker-react-nginx | |
| drwxr-xr-x 1 root root 4096 Jun 20 11:21 etc |
This file contains hidden or 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
| FROM node:14.1.0-stretch-slim as dev | |
| WORKDIR /docker-react-nginx | |
| # add node deps to path so that you don't have | |
| # to do ./node_modules/.bin/something | |
| ENV PATH=./node_modules/.bin:$PATH | |
| CMD ["npm", "start"] |
This file contains hidden or 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
| 'use strict'; | |
| const methodSelector = require('./utils/method-selector'); | |
| const getDocumentationUrl = require('./utils/get-documentation-url'); | |
| const message = 'Array.reduce not allowed'; | |
| const PROTOTYPE_SELECTOR = [ | |
| methodSelector({name: 'call'}), | |
| '[callee.object.type="MemberExpression"]', | |
| '[callee.object.property.type="Identifier"]', |
This file contains hidden or 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
| webpackJsonp([16], { | |
| 1039: function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(t, "__esModule", { | |
| value: !0 | |
| }); | |
| var i = function() { | |
| function e(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var i = t[n]; |
This file contains hidden or 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
| const climbStairs = (n) => { | |
| // climbed successfully | |
| if (n === 0) return 1; | |
| // overstepped | |
| if (n < 0) return 0; | |
| // climb | |
| return climbStairs(n - 1) + climbStairs(n - 2); | |
| } |