S3 Static Sites
What this will cover
- Host a static website at S3
- Redirect
www.website.com
towebsite.com
- Website can be an SPA (requiring all requests to return
index.html
) - Free AWS SSL certs
- Deployment with CDN invalidation
{ | |
"compilerOptions": { | |
"target": "ES2017", | |
"module": "CommonJS", | |
"moduleResolution": "node", | |
"outDir": "./build", | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"sourceMap": true | |
} |
What this will cover
www.website.com
to website.com
index.html
)import { LOCATION_CHANGE } from 'connected-react-router'; | |
import { connectRouter } from 'connected-react-router'; | |
export default history => { | |
const handleRouter = connectRouter(history); | |
const initialState = { | |
router: connectRouter(history) | |
}; |
import { take, put, call } from 'redux-saga/effects'; | |
import { eventChannel } from 'redux-saga'; | |
import { push } from 'react-router-redux'; | |
import actions from 'api/actions'; | |
import reducer from 'api/reducers/crud'; | |
import { loginMutation as mutation } from 'api/graphql/mutations'; | |
function createSocketChannel(firebase) { | |
return eventChannel((emit) => { | |
return firebase.auth() |
Christiano Milfont
#!/bin/sh -x | |
CURRENT=`git branch | grep "*" | awk '{print $2}'` | |
git commit -m "#${CURRENT}: $1" | |
# git add . | |
# commit "message" |
// model error | |
import { Record, fromJS, Map } from 'immutable'; | |
export default class ErrorRecord extends Record({ | |
warnings: Map(), | |
form: Map(), | |
fatal: Map(), | |
}) { | |
constructor(values) { | |
// sua lógi a |
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import { actions, mapDispatchToProps} from 'api/actions/errors'; | |
class ErrorBoundary extends React.Component { | |
componentDidCatch(error, info) { | |
this.props.dispatch({ | |
type: actions.GLOBAL_EXCEPTION, | |
payload: { |
Esse projeto era deployado num Oracle Server OC4J, os fontes no CVS do governo do estado do CE, a busca textual foi feita com Oracle Text.
Levamos quase 2 anos pra fazer um sistema que hoje seria concluído no máximo em 1 mês, pra ter uma idéia como quando cheguei aqui era tudo mato :D
A briga da época era se a modinha SVN ia pegar.
Por limitações da licitação desse projeto, não pudemos usar Hibernate e Spring que eram as modinhas que estavam dominando o mercado.