Skip to content

Commit

Permalink
fix logs folder ENOENT
Browse files Browse the repository at this point in the history
  • Loading branch information
nswbmw committed Dec 1, 2016
1 parent b0d7309 commit c0033bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
config/*
!config/default.*
logs
npm-debug.log
node_modules
coverage
10 changes: 8 additions & 2 deletions book/4.13 日志.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ app.use(expressWinston.errorLogger({
```
config/*
!config/default.*
logs
npm-debug.log
node_modules
coverage
Expand All @@ -90,7 +89,14 @@ config/*
!.gitignore
```

这样 git 会忽略 public/img 目录下所有上传的头像,而不忽略 public/img 目录。
这样 git 会忽略 public/img 目录下所有上传的头像,而不忽略 public/img 目录。同理,在 logs 目录下创建 .gitignore 忽略日志文件:

```
# Ignore everything in this directory
*
# Except this file
!.gitignore
```

上一节:[4.12 错误页面](https://github.com/nswbmw/N-blog/blob/master/book/4.12%20%E9%94%99%E8%AF%AF%E9%A1%B5%E9%9D%A2.md)

Expand Down
4 changes: 4 additions & 0 deletions logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

0 comments on commit c0033bc

Please sign in to comment.