Add config for app's log and error log for PM2.

{
"apps": [{
"name": "App1",
"script": "app1/server.js",
"log_file": "log/app1.log",
"error_file": "log/app1-err.log"
},{
"name": "App2",
"script": "app2/server.js",
"log_file": "log/app2.log",
"error_file": "log/app2-err.log"
}]
}

If on Linux & Mac, you might want to enable 'node' user's permission for writing logs.

[Whole Web, Node.js PM2] Loggin with PM2的更多相关文章

  1. [Whole Web] [Node.js, PM2] Controlling runaway apps using pm2

    shows how to enable features in your pm2 config file that allow you to prevent runaway apps from bri ...

  2. [Whole Web] [Node.js] [Browserify] [Grunt] Automation task with grunt-browserify & grunt-contrib-watch

    What we want is when the server side Node.js files have been changed, we want to use browserify to b ...

  3. [Whole Web, Node.js, PM2] Configuring PM2 for Node applications

    In this lesson, you will learn how to configure node apps using pm2 and a json config file. Let's sa ...

  4. [Whole Web, Node.js, PM2] Restarting your node.js app on code change using pm2

    Aadd watch to the config.json file: { "apps": [{ "name": "App1", " ...

  5. [Whole Web] [Node.js] Using npm run to launch local scripts

    npm run allows you to configure scripts inside of your package.json file which can access locally in ...

  6. [Whole Web, Nods.js, PM2] Passing environment variables to node.js using pm2

    learn how to pass environment variables to your node.js app using the pm2 config file. This is usefu ...

  7. Node.js入门(含NVM、NPM、NVM的安装)

    本文最初发表于博客园,并在GitHub上持续更新前端的系列文章.欢迎在GitHub上关注我,一起入门和进阶前端. 以下是正文. Node.js的介绍 引擎 引擎的特性: JS的内核即引擎.因为引擎有以 ...

  8. 转载--- 写给Node.js学徒的7个建议

    贴士 1: 在开发环境使用nodemon,在生产环境使用pm2 当你第一次开发Node.js应用的时候, 其中一件事情就是一次又一次的运行[file].js 就和揭伤疤一样. 当我第一次开发的node ...

  9. VPS 运行 Node.js 的一些经验

    VPS 系统选择 各系统安装难易对比 Ubuntu.Debian 较为简单,CentOS 稍麻烦,32位系统比64位更节省内存 DigitalOcean 甚至推出了 Ubuntu + Node.js ...

随机推荐

  1. absolute和relative的几个Demo

    这些例子最好通过FireFox结合FireBug调试查看 1.absolute让元素inline-block化 <!DOCTYPE html> <html xmlns="h ...

  2. Layout Resource官方教程(1)简介

    Layout Resource SEE ALSO Layouts A layout resource defines the architecture for the UI in an Activit ...

  3. 轻松搭建自己的Linux发行版本

    许多人想要搭建自己的Linux发行版本,可能是觉得有趣,也可能是为了学习更多的Linux知识,或者因为他们有很正式的问题要解决.但是秘密是:自己搭建完美的发行版本不是很困难的一件事.事实上,我们收集了 ...

  4. [译]PyUnit—Python单元测试框架(1)

    1. 原文及参考资料 原文链接:http://docs.python.org/2/library/unittest.html# 参考文档: http://pyunit.sourceforge.net/ ...

  5. Alexander Grothendieck去世了

    Alexander Grothendieck (German: [ˈɡroːtn̩diːk]; French: [ɡʁɔtɛndik]; 28 March 1928 – 13 November 201 ...

  6. HDU 5667 Sequence 矩阵快速幂

    官方题解: 观察递推式我们可以发现,所有的fi​​都是a的幂次,所以我们可以对f​i​​取一个以a为底的log,g​i​​=log​a​​ f​i​​ 那么递推式变g​i​​=b+c∗g​i−1​​+ ...

  7. ZOJ 3791 An Easy Game

     思路:dp+记忆化搜索,设dp[n][m]表示s1与s2不同字符个数为n,还需要变m步的方法数,那么: dp[n][m]  = (c[n][i]*c[N-n][K-i]) * dp[n-i+(K-i ...

  8. [NOIP1998]最大数

    1998年NOIP全国联赛提高组 题目描述 设有n个正整数 (n<=20), 将它们连接成一排,  组成一个最大的多位整数.例如: n=3时, 3个整数13, 312, 343连接成的最大整数为 ...

  9. 【CSS】Intermediate8:Page Layout

    1.Layout with CSS is easy. You just take a chunk of your page and shove it wherever you choose 2.pos ...

  10. aix i节点

    文件系统与inode• UNIX文件系统有很多种类型,如HFS,NFS,JFS,CDFS.虽然文件系统种类很多,但是也有着一些相同的数据结构:超级块.inode.目录等等. • inode译成中文就是 ...