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
/** src/index.tsx */ | |
export default ( | |
<SinglePageApp | |
stackName = "iclp" | |
buildPath = 'build' | |
region='eu-west-1'> | |
<Environment | |
name="prod" | |
domain="www.infrastructure-components.com" |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:*", | |
"apigateway:*", | |
"lambda:*", | |
"logs:*", | |
"cloudformation:*", | |
"cloudfront:*", |
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
/** src/index.tsx */ | |
import * as React from 'react'; | |
import { | |
Environment, | |
Route, | |
SinglePageApp | |
} from "infrastructure-components"; | |
export 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
provider: | |
region: eu-west-1 | |
stackName: ${self:service.name}-${self:provider.stage, env:STAGE, 'dev'} | |
environment: | |
STAGE: ${self:provider.stage, env:STAGE, 'dev'} | |
DOMAIN_URL: { "Fn::Join" : ["", [" https://#{ApiGatewayRestApi}", ".execute-api.eu-west-1.amazonaws.com/${self:provider.stage, env:STAGE, 'dev'}" ] ] } | |
TABLE_NAME: ${self:service}-${self:provider.stage, env:STAGE, 'dev'}-data-layer | |
iamRoleStatements: | |
- Effect: Allow | |
Action: |
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 * as React from 'react'; | |
import { | |
Environment, | |
IsomorphicApp, | |
Middleware, | |
Route, | |
WebApp, | |
} from "infrastructure-components"; |
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
/** src/index.tsx */ | |
import * as React from 'react'; | |
import { | |
Environment, | |
Route, | |
SinglePageApp | |
} from "infrastructure-components"; | |
import App from './App'; |
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
/** input array */ | |
const arrInput = [1,4,2]; | |
/********* with Array.map ***************/ | |
const arrMap = arrInput.map(cur=>cur+2); | |
/********* with for-loop ****************/ | |
const arrOutput = new Array(); | |
for (var i in arrInput) { |
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
/** input array */ | |
const arrInput = [1,4,2]; | |
/** prepare an output array */ | |
const arrOutput = new Array(); | |
/** loop through the index of the input array */ | |
for (var idx in arrInput) { | |
/** add to the output array ... */ | |
arrOutput.push( |
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 App = () => { | |
return <BrowserRouter> | |
<Route path="/" render={() => <Home />} /> | |
<Route path="/dashboard" render={() => <Dashboard />} /> | |
</BrowserRouter> | |
} |
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
"scripts": { | |
"build": "webpack --config webpack.config.js", | |
"deploy": "npm run build && sls deploy && s3sync" | |
} |
OlderNewer