Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
| { | |
| "extends": [ | |
| "eslint-config-react-app" | |
| ], | |
| "plugins": ["react", "import"], | |
| "rules": { | |
| "import/no-unresolved": "error" | |
| }, | |
| "settings": { | |
| "import/parsers": { |
| import withData from '@/lib/withData' | |
| import { ApolloClient } from 'apollo-boost' | |
| import App, { AppProps, Container } from 'next/app' | |
| import { ApolloProvider } from 'react-apollo' | |
| export default withData( | |
| class extends App<MyAppProps> { | |
| public static async getInitialProps({ Component, ...ctx }) { | |
| let pageProps = {} |
| /** | |
| * server/dataSources/Auth.js | |
| * Auth implementation, it's not really a dataSource so it doesn't need to be here | |
| */ | |
| const { authenticate, createJwt } = require('../lib/passport'); | |
| const { ON_HTTPS } = require('../configs'); | |
| const ONE_MINUTE = 1000 * 60; | |
| const ONE_DAY = ONE_MINUTE * 60 * 24; | |
| const ONE_MONTH = ONE_DAY * 30; |
| function getAadToken(user, password, identifier) { | |
| return puppeteer.launch({ headless: true }).then(async browser => { | |
| try { | |
| const page = await browser.newPage(); | |
| await page.goto("SITEURL"); | |
| await page.click( | |
| "LOGINBUTTON" | |
| ); |
Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
| # Official framework image. Look for the different tagged releases at: | |
| # https://hub.docker.com/r/library/node/tags/ | |
| image: node:6 | |
| before_script: | |
| - npm install | |
| # This folder is cached between builds | |
| # http://docs.gitlab.com/ce/ci/yaml/README.html#cache | |
| cache: |
| ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl |