官术网_书友最值得收藏!

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:

  1. Clone the repository in your development space:
$ git clone https://github.com/legorie/gcpcookbook.git 
  1. Navigate to the directory where the mysite application is stored:
$ cd gcpcookbook/Chapter01/mysite
  1. With your favorite editor, create a filename .env in the mysite folder:
COOKIE_SECRET=d44d5c45e7f8149aabc068244 
MONGO_URI=mongodb://localhost/mysite 
  1. Install all the packages required for the application to work:
$ npm install 
  1. Start the mongod service in your development machine
  2. Run the application:
$ node keystone.js 
  1. You'll see the following message logged on the Terminal:
------------------------------------------------
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
------------------------------------------------
  1. The application is now available on http://localhost:3000, as shown:
  1.  You can stop the local server by pressing Ctrl + C.
主站蜘蛛池模板: 昌邑市| 潢川县| 股票| 瓮安县| 深州市| 嵊泗县| 卫辉市| 黄梅县| 遂宁市| 疏附县| 英吉沙县| 阿克| 盱眙县| 昌黎县| 法库县| 芮城县| 买车| 甘谷县| 内江市| 汝南县| 东山县| 明光市| 阿拉善盟| 沧州市| 平南县| 万载县| 子洲县| 团风县| 通江县| 德安县| 延长县| 苏州市| 临潭县| 马鞍山市| 科技| 博爱县| 江口县| 时尚| 慈溪市| 泸州市| 宁强县|