results matching ""
No results matching ""
5.2.Run
There are 5 ways to run the codes: (The first and second methods are recommended to be the most efficient)
¶ 5.2.1. Local web server
In the src directory, run any kind of these web servers (apache, AMP, lighttp, or Nginx, etc.) to view the execution. This method immediately shows the newly written codes.
¶ 5.2.2. Terminal web server
Find the Terminal in Mac utility. After it is opened, the Terminal window pops up, where you can type in cd src. Go to the src directory, and then enter the following command to open a web server:
Python -m SimpleHTTPServer 8888
open 'http://127.0.0.1:8888/'
-Finally open http://127.0.0.1:8888/ in the browser This method also immediately shows the newly written code. The efficiency of this method is the same as that of Method 1.
Exit: Ctrl+C.
¶ 5.2.3. Remote web server
Execute the publish command: sh p.sh
Commit it to github, then open https://f.tml.ink/ You can see the result of the execution. This method spends 1 more minute than Method 1 do. This is the easiest way. The good point is that you don't need a web server and Xcode, and you don't need any other softwares.
¶ 5.2.4. Xcode build-in web server
Execute the publish command: sh p.sh
Open the Xcode project in the iOS directory, compile and run, you can see the running result in the iPhone simulator. This method spends 5 more minutes than Method 1 do.
¶ 5.2.5. iPhone build-in web server
Execute the publish command: sh p.sh
You can also open the Xcode project in the iOS directory, publish it to the app store, and download the app in the app store to see the running result. Because you have to wait for Apple to review the app. This method spends 5 more days than Method 1 do.
小礼物刷一波,打赏作者

Paypal Donate

Venmo Donate

WeChat微信打赏

Alipay支付宝打赏