8. react-starter-kit
● "isomorphic" web app boilerplate
○ Node.js
○ Express
○ GraphQL
○ React
○ with modern web development tools
■ Webpack
■ Babel
■ Browsersync
9. prerequisite
● Node.js v5.0 or newer
● npm v3.3 or newer
● node-gyp prerequisited
○ python v2.7
○ make, gcc (or Xcode or Visual C++ Build Tools or any toolchains)
● text editor or IDE
10. getting started
● git clone https://github.com/kriasoft/react-starter-kit.git MyApp
● cd MyApp
● npm install
● npm start
○ http://localhost:3000/ - Node.js server (build/server.js)
○ http://localhost:3000/graphql - GraphQL server and IDE
○ http://localhost:3001/ - BrowserSync proxy with HMR, React Hot Transform
○ http://localhost:3002/ - BrowserSync control panel (UI)
12. directory layout
.
├── /build/ # The folder for compiled output
├── /docs/ # Documentation files for the project
├── /node_modules/ # 3rd-party libraries and utilities
├── /src/ # The source code of the application
│ ├── /components/ # React components
│ ├── /content/ # Static pages like About Us, Privacy Policy etc.
│ ├── /core/ # Core framework and utility functions
│ ├── /data/ # GraphQL server schema and data models
│ ├── /public/ # Static files which are copied into the /build/public folder
│ ├── /routes/ # Page/screen components along with the routing information
│ ├── /views/ # Express.js views (templates) for index and error pages
│ ├── /client.js # Client-side startup script
│ ├── /config.js # Global application settings
│ └── /server.js # Server-side startup script
├── /test/ # Unit and end-to-end tests
├── /tools/ # Build automation scripts and utilities
│ ├── /lib/ # Library for utility snippets
│ ├── /build.js # Builds the project from source to output (build) folder
│ ├── /bundle.js # Bundles the web resources into package(s) through Webpack
│ ├── /clean.js # Cleans up the output (build) folder
│ ├── /copy.js # Copies static files to output (build) folder
│ ├── /deploy.js # Deploys your web application
│ ├── /run.js # Helper function for running build automation tasks
│ ├── /runServer.js # Launches (or restarts) Node.js server
│ ├── /start.js # Launches the development web server with "live reload"
│ └── /webpack.config.js # Configurations for client-side and server-side bundles
└── package.json # The list of 3rd party libraries and utilities
13. initial top page
● http://localhost:3001/
● try to…
○ add test page (only “hello world”)
○ add link to test page on header