Giter Site home page Giter Site logo

react_daydayup's Introduction

React_daydayup

2017/07/25

1.搭建koa框架

koa快速开始:https://github.com/ChenShenhai/koa2-note/blob/master/note/start/quick.md
--npm init 初始化package.json
--npm install koa --save 安装koa2
--本示例node的版本必须在7.6以上(async/await),当前node版本为8.1.2,如果报错listen EADDRINUSE :::3000,修改端口号即可

基本实现这个功能:https://github.com/douglasvegas/fanpianAdmin

#2.安装mysql模块
--npm install mysql --save
--node mysql 查看demo

#3.前端文件夹是WebClient
--npm install react redux react-redux react-router --save 安装react全家桶
--npm install webpack --save 打包工具
--npm install antd --save 蚂蚁金服前端组件
--因为有浏览器不支持ES6语法,一定要用到babel转换器,
--- 第一步 .babelrc是Babel的配置文件,放在项目的根目录下,使用babel的第一步就是配置这个文件

    #ES2015转码规则  
    npm install --save-dev babel-preset-es2015  

    #react转码规则  
    npm install --save-dev babel-preset-react  

    #ES7不同阶段语法提案的转码规则(共4个阶段),选择装一个  
    npm install --save-dev babel-preset-stage-0  
    npm install --save-dev babel-preset-stage-1  
    npm install --save-dev babel-preset-stage-2  
    npm install --save-dev babel-preset-stage-3  

    {    
      "presets": [  
          "es2015",  
          "react",  
          "stage-2"  
      ],   //presets字段设定转码规则
      "plugins": []  
    }   
--- 第二步,

卡在webpack上 http://www.cnblogs.com/-walker/p/6056529.html

2017/07/28
#4.package.json 添加script
"script":{
"start": "webpack-dev-server --hot --inline --colors --content-base ./build",
"build": "webpack --progress --colors"
}

npm install --save-dev webpack-dev-server - webpack官网出的一个小型express服务器,主要特性是支持热加载.  

http://www.jianshu.com/p/324fd1c124ad 从零开始搭建一个react项目  !!!!!!  

jsx-loader --需要安装,不然读不懂jsx  

react_daydayup's People

Contributors

suntaogit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.