-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sushi
committed
Nov 24, 2018
1 parent
de89b04
commit d56ef0f
Showing
1 changed file
with
0 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1 @@ | ||
## 起步 | ||
|
||
## mongdob环境搭建 | ||
|
||
> 安装mongodb | ||
可参考[菜鸟教程](!http://www.runoob.com/mongodb/mongodb-osx-install.html) | ||
|
||
``` | ||
1、cd /usr/local | ||
2、sudo curl -O https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-4.0.2.tgz | ||
3、sudo tar -zxvf mongodb-osx-ssl-x86_64-4.0.2.tgz | ||
4、sudo mv mongodb-osx-ssl-x86_64-4.0.2.tgz | ||
5、vim ~/.zshrc | ||
#mongo | ||
export MONGO_PATH=/usr/local/mongodb/mongodb-osx-ssl-x86_64-4.0.2.tgz | ||
export PATH=$PATH:$MONGO_PATH/bin | ||
``` | ||
|
||
|
||
> 运行mongodb使用instagram数据库 | ||
* sudo mkdir -p /data/db | ||
* mongod --dbpath /data/db | ||
* `无权限使用 sudo mongod --dbpath /data/db` | ||
* `打开另一个命令行窗口` | ||
* mongodb | ||
* use instagram | ||
|
||
## 运行web项目 | ||
|
||
> 安装依赖 | ||
`yarn install` | ||
|
||
> 启动 | ||
`npm run start` |