This file contains 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
import { enableProdMode, NgZone } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { Router } from '@angular/router'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
import singleSpaAngular from 'single-spa-angular'; | |
import { singleSpaPropsSubject } from './single-spa/single-spa-props'; | |
if (environment.production) { |
This file contains 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
{ | |
"short_name": "React App", | |
"name": "Create React App Sample", | |
"icons": [ | |
{ | |
"src": "favicon.ico", | |
"sizes": "64x64 32x32 24x24 16x16", | |
"type": "image/x-icon" | |
} | |
], |
This file contains 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
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import singleSpaReact from 'single-spa-react' | |
import { property } from 'lodash' | |
import setPublicPath from './set-public-path.js' | |
const reactLifecycles = singleSpaReact({ | |
React, | |
ReactDOM, | |
loadRootComponent: () => import(/* webpackChunkName: "react-app" */'./App.js').then(property('default')), |
This file contains 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.15 as build-deps | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn | |
COPY . ./ | |
RUN yarn build | |
FROM nginx:1.12-alpine | |
COPY --from=build-deps /usr/src/app/build /usr/share/nginx/html | |
EXPOSE 80 |
This file contains 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 crypto = require('crypto'); | |
// Encrypt a message with a secret key | |
const message = 'This is a secret message'; | |
const secretKey = 'This is a secret key'; | |
// Create a 256-bit cipher key and initialization vector | |
const cipherKey = crypto.createHash('sha256').update(secretKey).digest(); | |
const iv = crypto.randomBytes(16); |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type User struct { |
OlderNewer