text有用(代码片段)

author author     2022-12-02     269

关键词:

//exporting variable
module.exports =  mongoose ;

//installing express, body parser is used to send json to server
npm i express@4.14.0 body-parser@1.15.2 --save

//installing loadash
npm i lodash@4.15.0 --save

//run mongodb
cd to username/mongo/bin
./mongod --dbpath ~/mongo-data

//on windows, git bash on installed mongo db C:\Program Files\MongoDB\Server\3.6\bin
./mongod --dbpath ~/mongo-data
note: don't use gitbash
tested: mongod --dbpath C:\Users\Andrian.Gungon\mongo-data --port 27017

//to display like this
//console.log(JSON.stringify(user, undefined, 2));

  "_id": "5aafceab5e048950187f101c",
  "email": "andriangungon@gmail.com",
  "__v": 0


//heroku
heroku create //creating app
heroku addons:create mongolab:sandbox //installing monglab addon
git push heroku master //pushing files to heroku

text有用(代码片段)

查看详情

text有用(代码片段)

查看详情

text有用(代码片段)

查看详情

text有用的东西(代码片段)

查看详情

text有用的书签。(代码片段)

查看详情

text有用的命令(代码片段)

查看详情

text有用的链接(代码片段)

查看详情

text有用的命令(代码片段)

查看详情

text有用的数学(代码片段)

查看详情

text有用的功能(代码片段)

查看详情

text我有用的别名(代码片段)

查看详情

text有用的码头图像(代码片段)

查看详情

text有用的快捷方式(代码片段)

查看详情

text一个有用的技巧(代码片段)

查看详情

text*shogun*-很有用(代码片段)

查看详情

text一些有用的扩展(代码片段)

查看详情

text有用的反应命令(代码片段)

查看详情

text[有用的库]一些有用的android库(代码片段)

查看详情