Skip to content

Instantly share code, notes, and snippets.

# 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"]
ENV NODE_ENV production
# build client JS and server
RUN yarn build
RUN yarn build:server
COPY . .
@ankeetmaini
ankeetmaini / Dockerfile
Last active January 15, 2021 10:50
install dependencies
COPY package.json yarn.*lock ./
RUN yarn install --frozen-lockfile
@ankeetmaini
ankeetmaini / Dockerfile
Created December 28, 2020 12:45
Dockerfile step 2
FROM node:12-stretch-slim as test
WORKDIR /docker-react-nginx
@ankeetmaini
ankeetmaini / out.log
Last active December 28, 2020 12:41
log
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
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"]
'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"]',
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];
@ankeetmaini
ankeetmaini / 1-stair-climber-recursion.js
Last active February 12, 2019 07:25
Stair Climber [step by step]
const climbStairs = (n) => {
// climbed successfully
if (n === 0) return 1;
// overstepped
if (n < 0) return 0;
// climb
return climbStairs(n - 1) + climbStairs(n - 2);
}