- Flask By Example
- Gareth Dwyer
- 241字
- 2021-07-09 20:06:53
Setting up our project and a Git repository
We could simply edit our Hello World application to add the desired functionality, but it's cleaner to start a new project. We'll create a new Git repository, a new Python file, a new .wsgi
file, and a new Apache configuration file. We'll do this for each of the projects in the book, which means that all three of the projects as well as the original Hello World application will be accessible from our web server.
Setting up is very similar to what we did for our Hello World application in Chapter 1, Hello, World! but we'll briefly go through the steps again as we don't have to repeat a lot of the configuration and installation, as follows:
- Log in to your GitHub or BitBucket account and create a new repository called
headlines
. Take note of the URL you're given for this blank repository. - On your local machine, create a new directory called
headlines
in your home directory or wherever you put thefirstapp
directory. - Create a new file in this directory called
headlines.py
. - In your terminal, change the directory to the
headlines
directory and initialize the Git repository by executing the following commands:cd headlines git init git remote add origin <your headlines git URL> git add headlines.py git commit -m "initial commit" git push –u origin master
Now, we're almost ready to push code to our new repository; we just need to write it first.
推薦閱讀
- 基于Java技術(shù)的Web應(yīng)用開發(fā)
- 實(shí)戰(zhàn)Java程序設(shè)計(jì)
- Visual Basic程序設(shè)計(jì)習(xí)題解答與上機(jī)指導(dǎo)
- 匯編語言程序設(shè)計(jì)(第3版)
- iOS編程基礎(chǔ):Swift、Xcode和Cocoa入門指南
- Android項(xiàng)目實(shí)戰(zhàn):手機(jī)安全衛(wèi)士開發(fā)案例解析
- Illustrator CC平面設(shè)計(jì)實(shí)戰(zhàn)從入門到精通(視頻自學(xué)全彩版)
- 創(chuàng)意UI:Photoshop玩轉(zhuǎn)APP設(shè)計(jì)
- Web程序設(shè)計(jì):ASP.NET(第2版)
- jQuery技術(shù)內(nèi)幕:深入解析jQuery架構(gòu)設(shè)計(jì)與實(shí)現(xiàn)原理
- 會當(dāng)凌絕頂:Java開發(fā)修行實(shí)錄
- 零基礎(chǔ)學(xué)Java第2版
- Java從入門到精通(視頻實(shí)戰(zhàn)版)
- HTML5與CSS3權(quán)威指南
- Google Adsense優(yōu)化實(shí)戰(zhàn)