This file contains hidden or 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 express from 'express'; | |
| import webpack from 'webpack'; | |
| const render = require('../dist/assets/SSR'); | |
| const app = express(); | |
| app.get('/', render.default); | |
| const port = 3000; | |
| app.listen(port); |
This file contains hidden or 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 { render } from 'react-dom'; | |
| import App from './components/App'; | |
| render(<App />, document.getElementById('root')); |
This file contains hidden or 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
| .wrapper { | |
| background: red; | |
| } |
This file contains hidden or 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 styles from './App.css' | |
| export default class App extends Component { | |
| render() { | |
| return ( | |
| <div className={styles.wrapper}> | |
| Hello world! | |
| </div> | |
| ); |
This file contains hidden or 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 path = require('path'); | |
| module.exports = { | |
| publicPath: '/assets/', | |
| assetsPath: path.join(__dirname, '..', 'dist', 'assets'), | |
| commonLoaders: [ | |
| { | |
| test: /\.js$/, | |
| loader: 'babel', | |
| include: path.join(__dirname, '..', 'app'), |
This file contains hidden or 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 { publicPath, assetsPath, commonLoaders } = require('./common.config'); | |
| const webpack = require('webpack'); | |
| const path = require('path'); | |
| module.exports = { | |
| devtool: 'eval', | |
| name: 'client', | |
| context: path.join(__dirname, '..', 'app'), | |
| entry: './client.js', | |
| output: { |
This file contains hidden or 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 { publicPath, assetsPath, commonLoaders } = require('./common.config'); | |
| const path = require('path'); | |
| const nodeExternals = require('webpack-node-externals'); | |
| module.exports = { | |
| name: 'SSR', | |
| context: path.join(__dirname, '..', 'app'), | |
| entry: './SSR.js', | |
| output: { | |
| path: assetsPath, |
This file contains hidden or 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 express from 'express'; | |
| import webpack from 'webpack'; | |
| import webpackConfig from '../webpack/webpack.config.dev-client'; | |
| const render = require('../dist/assets/SSR'); | |
| const app = express(); | |
| const compiler = webpack(webpackConfig); | |
| app.use(require('webpack-dev-middleware')(compiler, { | |
| noInfo: true, |
This file contains hidden or 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
| export default ({ body, title }) => (` | |
| <!DOCTYLE html> | |
| <html> | |
| <head> | |
| <title>${title}</title> | |
| </head> | |
| <body> | |
| <div id="root">${body}</div> | |
| </body> |
This file contains hidden or 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
| { | |
| "name": "appiumTutorial", | |
| "version": "0.0.1", | |
| "private": true, | |
| "scripts": { | |
| "start": "node node_modules/react-native/local-cli/cli.js start", | |
| "test": "source venv/bin/activate && LOCATION='local' py.test && deactivate", | |
| "appium": "appium", | |
| "appium:doctor": "appium-doctor" | |
| }, |