Next we start to do this project, because the beginner soon began to learn while doing, so some places design is not very reasonable. Please forgive us. 0.0
The following three folders are described in
Guokuapp: It's the folder where I developed the app.
GUOKUDB: Inside is the INSERT statement of my database document, where I use MongoDB.
Guokuserver: That's the server I wrote with node. js.
Let's take a look at the contents of Guokuapp:
--------------below is the SRC folder contents---------------------
The first one is the utility command line: $ react-native init guokuapp automatically generated file directory, I do not introduce more.
The second one is my src directory, Assets folder resource folder, components are their own packages, screens is the interface we see.
So how do I get this project to work?
First, clone my project from my GitHub.
git clone [email protected]:weifengzz/guoku.git
Second, use "NPM Install" Installation Dependency (premise: NPM)
Third, run MongoDB (premise: MongoDB installed)
Command "$./Mongod"
Then open a new window, enter the command: "$. Mongs"
Iv. inserting data into MongoDB:
Database operation statements I exist in these four folders are inserted in turn, each file is the front of the empty statement is the standard format, the following statement if not conform to this format do not insert, I used the horizontal line has been separated.
V. Run server node. JS (provided that node is already installed)
You can use the command "$node index.js."
Vi. final use of $react-native run-android
Or Xcode opens iOS to see the effects of Android and iOS respectively .
Directory
Project Download: Https://github.com/weifengzz/GuoKu
Use React-native to do a simple application-02 project Construction and operation