个人认为RN学习经典入门的教程就是
React Native中文网
React Native英文网
再就是FB开源的经典App F8,跑起来的时候自己都要哭了,折腾了两天了,才把F8跑起来,F8的github安装教程少了很多的软件安装的步骤,比如Tomcat,JDK等。
先看F8App的github安装教程,其中也有个人补充的
Setup
Clone the repo
$ git clone https://github.com/fbsamples/f8app.git
$ cd f8app
Install dependencies (npm v3+):
$ npm install
$ (cd ios; pod install) # only for iOS version
注:如果提示npm: command not found,则去Node.js官网下载node.pkg包,然后再执行npm install 就可以了
Make sure MongoDB is running:
$ lsof -iTCP:27017 -sTCP:LISTEN
NOTE: if installed with Homebrew run brew info mongo
and check out the Caveats section.
If you prefer to use an external MongoDB server, set DATABASE_URI
:
$ export DATABASE_URI=mongodb://example-mongo-hosting.com:1337/my-awesome-database
MangoDB的安装步骤请参考Mac OX上安装MongoDB
Start Parse/GraphQL servers:
$ npm start
Import sample data (the local Parse Server should be running):
$ npm run import-data
Make sure everything works by visiting:
Parse Dashboard: http://localhost:8080/dashboard
GraphiQL: http://localhost:8080/graphql
要使http://localhost:8080 works,
- 先要安装JDK(是JDK不是JRE,切记!)
- 然后安装Apache Tomcat,
- 启动apache,sudo apachectl start
JDK下载下来直接安装就好了,没有啥要注意的。
Mac下Apache Tomcat安装配置技巧
如果在运行npm start命令的时候遇到8080端口被占的情况,要运行如下命令查看哪个进程占用了8080端口
lsof -w -n -i tcp:8080
在返回的数据中找到PID对应的数字,一一kill掉
kill -9 3812
特别要注意的是,Tomcat的版本和JDK的版本要对应,要不然会出现[Unsupported major.minor version 52.0]的Error
遇到的问题以及查找的资料链接
Unsupported major.minor version 52.0
Grails: Resolving “Server failed to start for port 8080: Address already in use.”
网友评论