- Google Cloud Platform Cookbook
- Legorie Rajan PS
- 155字
- 2021-08-27 19:13:23
Running the application on the development machine
Follow these steps to download the source code from GitHub and configure it to work on your development machine:
- Clone the repository in your development space:
$ git clone https://github.com/legorie/gcpcookbook.git
You can also download the code from: https://github.com/PacktPublishing/Google-Cloud-Platform-Cookbook.
- Navigate to the directory where the mysite application is stored:
$ cd gcpcookbook/Chapter01/mysite
- With your favorite editor, create a filename .env in the mysite folder:
COOKIE_SECRET=d44d5c45e7f8149aabc068244 MONGO_URI=mongodb://localhost/mysite
- Install all the packages required for the application to work:
$ npm install
- Start the mongod service in your development machine
- Run the application:
$ node keystone.js
------------------------------------------------
Applying update 0.0.1-admins...
------------------------------------------------
mySite: Successfully applied update 0.0.1-admins.
Successfully created:
* 1 User
------------------------------------------------
Successfully applied 1 update.
------------------------------------------------
------------------------------------------------
KeystoneJS Started:
mySite is ready on port 3000
------------------------------------------------
- The application is now available on http://localhost:3000, as shown:

- You can stop the local server by pressing Ctrl + C.
推薦閱讀
- 機(jī)器學(xué)習(xí)實(shí)戰(zhàn):基于Sophon平臺(tái)的機(jī)器學(xué)習(xí)理論與實(shí)踐
- 過程控制工程及仿真
- Dreamweaver 8中文版商業(yè)案例精粹
- 影視后期制作(Avid Media Composer 5.0)
- CSS全程指南
- 數(shù)據(jù)通信與計(jì)算機(jī)網(wǎng)絡(luò)
- The Python Workshop
- 新編計(jì)算機(jī)圖形學(xué)
- Mastering Geospatial Analysis with Python
- 精通LabVIEW程序設(shè)計(jì)
- WOW!Photoshop CS6完全自學(xué)寶典
- 筆記本電腦使用與維護(hù)
- Deep Learning Essentials
- 人工智能基礎(chǔ)
- Ubuntu 9 Linux應(yīng)用基礎(chǔ)