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
/* | |
Pseudo code - to serve as a help guide. | |
*/ | |
const copyFrom = require('pg-copy-streams').from; | |
const Readable = require('stream').Readable; | |
const { Pool,Client } = require('pg'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const datasourcesConfigFilePath = path.join(__dirname,'..','..','server','datasources.json'); | |
const datasources = JSON.parse(fs.readFileSync(datasourcesConfigFilePath, 'utf8')); |
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, {Component} from 'react'; | |
import './Timer.scss'; //Have your own styling | |
import { Row, Col } from 'reactstrap'; | |
export class Timer extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
remainingMinutes: 0, | |
remainingSeconds: 0 |
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
/* | |
Base component to hold the Notification. | |
We don't need to have Notification in every single React component. | |
*/ | |
class App extends PureComponent { | |
render () { | |
return ( | |
<div> | |
……. |
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
Schenario | JDK Choice | Reason | |
---|---|---|---|
Bundling JDK with your product | OpenJDK | OpenJDK is licensed under GNU GPLv2. Oracle is licensed under Oracle Binary Code License Agreement | |
Using JDK during development | OracleJDK | Oracle comes with additional features for debugging |
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 openjdk:8 AS TEMP_BUILD_IMAGE | |
ENV APP_HOME=/usr/app/ | |
WORKDIR $APP_HOME | |
COPY build.gradle settings.gradle gradlew $APP_HOME | |
COPY gradle $APP_HOME/gradle | |
RUN ./gradlew build || return 0 | |
COPY . . | |
RUN ./gradlew build | |
FROM openjdk:8 |
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
buildscript { | |
ext { | |
springBootVersion = '2.0.2.RELEASE' | |
} | |
repositories { | |
mavenCentral() | |
maven { url "https://repo.spring.io/milestone" } | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
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
docker volume create --name gradle-cache | |
docker run --rm -v gradle-cache:/home/gradle/.gradle -v "$PWD":/home/gradle/project -w /home/gradle/project gradle:4.7.0-jdk8-alpine gradle build | |
ls -ltrh ./build/libs |
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 openjdk:8 | |
ENV APP_HOME=/usr/app/ | |
WORKDIR $APP_HOME | |
COPY ./build/libs/* ./app.jar | |
EXPOSE 8080 | |
CMD ["java","-jar","app.jar"] |
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
version: '3.3' | |
services: | |
mongo: | |
image: mongo:3.6 | |
restart: always | |
hostname: mongo | |
ports: | |
- '27017:27017' | |
volumes: |
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
{ | |
... | |
"playground": { | |
"root": "", | |
"sourceRoot": "src", | |
"projectType": "application", | |
"architect": { | |
"build": { | |
"builder": "@angular-devkit/build-angular:browser", |
OlderNewer