Skip to content

1150691947/itk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

itkAdmin

项目介绍

itk web端管理界面

核心技术框架

  • react
  • react-dom
  • react-router
  • redux
  • redux-thunk
  • react-md-editor
  • isomorphic-fetch
  • react-paginate
  • react-redux
  • marked
  • es6-promise
  • classnames

系统依赖

  • Node ( >= 6.5 )
  • npm ( >= 3.10.6 )

开发环境准备

第一步, 安装项目依赖

$ npm install

第二步, 启动服务

$ npm start

第三步, 浏览器访问: http://localhost:3000 结束.

如何发布?

第一步, 配置nginx

先根据项目里的 /src/config/nginx.conf.example 文件, 修改其中的配置, 然后将文件复制到你的服务器上 nginx 所在目录的 /etc/nginx/conf.d 目录下, 命名为 xxx.conf 的文件. 然后重启 nginx.

第二步, 在 package.json 文件中添加 一条 deploy 命令放在 scripts 下.

参考: "deploy": "react-scripts build && scp -r build/ 服务器用户名@服务器域名:~/项目所在目录/"

第三步, 发布

$ npm run deploy

学习参考资料

在学习 React 过程中, React 文档做的没有 Vue 好, 文档中的例子各种语法. 对着照做不一定对, 也不方便查询, 踩过很多坑后发现一下相对比较好的文档, 分享给大家.

React 中文文档(这个文档很好查询, 但是很多内容写的太简单了没讲清楚, 而且内容不全): https://hulufei.gitbooks.io/react-tutorial/content/index.html

React 官方英文文档: https://facebook.github.io/react/docs/getting-started.html

React 中文文档(这个文档比较差): http://reactjs.cn/react/docs/getting-started-zh-CN.html

极客学院提供的 React 中文文档: http://wiki.jikexueyuan.com/project/react/

另一个 Reac 中文文档(这个比较全面, 但是不便于搜索): http://www.phperz.com/article/15/0712/140537.html

React Router 中文文档: https://react-guide.github.io/react-router-cn/

RubyChina API: https://ruby-china.org/api

ReacChina 社区(这里面有很多资源): http://react-china.org/

ES6 文档: http://es6.ruanyifeng.com/#docs/intro

Redux 介绍: http://www.alloyteam.com/2015/09/react-redux/

Google 数据分析

https://analytics.google.com 创建新账户, 获到到相应的 JS 代码, 替换 index.html 中的javascript 代码片段. 作

LICENSE

MIT