<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Use PM2, typescript for Heroku]]></title><description><![CDATA[<p>Please help, how configure pm2 with watcher changes files and restart after crush?<br />
Old config used nodemon.</p>
<p>package.json</p>
<pre><code>{
  &quot;name&quot;: &quot;test-server&quot;,
  &quot;version&quot;: &quot;0.0.1&quot;,
  &quot;description&quot;: &quot;test server&quot;,
  &quot;main&quot;: &quot;index.js&quot;,
  &quot;scripts&quot;: {
    &quot;start&quot;: &quot;nodemon -L --exec ts-node src/index.ts&quot;,
    &quot;build-ts&quot;: &quot;tsc&quot;,
    &quot;postinstall&quot;: &quot;npm run build-ts&quot;
  },
  &quot;engines&quot;: {
    &quot;node&quot;: &quot;8.9.1&quot;
  },
  &quot;author&quot;: &quot;test&quot;,
  &quot;license&quot;: &quot;ISC&quot;,
  &quot;dependencies&quot;: {
    &quot;express-basic-auth&quot;: &quot;^1.1.6&quot;,
    &quot;@colyseus/monitor&quot;: &quot;^0.1.11&quot;,
    &quot;colyseus&quot;: &quot;^0.9.28&quot;,
    &quot;cors&quot;: &quot;^2.8.5&quot;,
    &quot;express&quot;: &quot;^4.16.4&quot;,
    &quot;nodemon&quot;: &quot;^1.18.9&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@types/express&quot;: &quot;^4.16.0&quot;,
    &quot;@types/node&quot;: &quot;^10.12.18&quot;,
    &quot;ts-node&quot;: &quot;^8.0.1&quot;,
    &quot;typescript&quot;: &quot;^3.2.4&quot;
  }
}
</code></pre>
<p>tsconfig.json</p>
<pre><code>{
    &quot;compilerOptions&quot;: {
        &quot;outDir&quot;: &quot;lib&quot;,
        &quot;module&quot;: &quot;commonjs&quot;,
        &quot;lib&quot;: [&quot;es6&quot;],
        &quot;target&quot;: &quot;es2016&quot;,
        &quot;declaration&quot;: true,
        &quot;noImplicitAny&quot;: false,
        &quot;experimentalDecorators&quot;: true,
        &quot;sourceMap&quot;: true,
    },
    &quot;include&quot;: [
      &quot;**/*.ts&quot;
    ]
}
</code></pre>
<p>Thanks for help</p>
]]></description><link>http://discuss.colyseus.io/topic/210/use-pm2-typescript-for-heroku</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 08:52:52 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/210.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Feb 2019 13:23:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Use PM2, typescript for Heroku on Mon, 18 Feb 2019 20:22:37 GMT]]></title><description><![CDATA[<p>Please help, how configure pm2 with watcher changes files and restart after crush?<br />
Old config used nodemon.</p>
<p>package.json</p>
<pre><code>{
  &quot;name&quot;: &quot;test-server&quot;,
  &quot;version&quot;: &quot;0.0.1&quot;,
  &quot;description&quot;: &quot;test server&quot;,
  &quot;main&quot;: &quot;index.js&quot;,
  &quot;scripts&quot;: {
    &quot;start&quot;: &quot;nodemon -L --exec ts-node src/index.ts&quot;,
    &quot;build-ts&quot;: &quot;tsc&quot;,
    &quot;postinstall&quot;: &quot;npm run build-ts&quot;
  },
  &quot;engines&quot;: {
    &quot;node&quot;: &quot;8.9.1&quot;
  },
  &quot;author&quot;: &quot;test&quot;,
  &quot;license&quot;: &quot;ISC&quot;,
  &quot;dependencies&quot;: {
    &quot;express-basic-auth&quot;: &quot;^1.1.6&quot;,
    &quot;@colyseus/monitor&quot;: &quot;^0.1.11&quot;,
    &quot;colyseus&quot;: &quot;^0.9.28&quot;,
    &quot;cors&quot;: &quot;^2.8.5&quot;,
    &quot;express&quot;: &quot;^4.16.4&quot;,
    &quot;nodemon&quot;: &quot;^1.18.9&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@types/express&quot;: &quot;^4.16.0&quot;,
    &quot;@types/node&quot;: &quot;^10.12.18&quot;,
    &quot;ts-node&quot;: &quot;^8.0.1&quot;,
    &quot;typescript&quot;: &quot;^3.2.4&quot;
  }
}
</code></pre>
<p>tsconfig.json</p>
<pre><code>{
    &quot;compilerOptions&quot;: {
        &quot;outDir&quot;: &quot;lib&quot;,
        &quot;module&quot;: &quot;commonjs&quot;,
        &quot;lib&quot;: [&quot;es6&quot;],
        &quot;target&quot;: &quot;es2016&quot;,
        &quot;declaration&quot;: true,
        &quot;noImplicitAny&quot;: false,
        &quot;experimentalDecorators&quot;: true,
        &quot;sourceMap&quot;: true,
    },
    &quot;include&quot;: [
      &quot;**/*.ts&quot;
    ]
}
</code></pre>
<p>Thanks for help</p>
]]></description><link>http://discuss.colyseus.io/post/687</link><guid isPermaLink="true">http://discuss.colyseus.io/post/687</guid><dc:creator><![CDATA[daimonkor]]></dc:creator><pubDate>Mon, 18 Feb 2019 20:22:37 GMT</pubDate></item><item><title><![CDATA[Reply to Use PM2, typescript for Heroku on Thu, 21 Feb 2019 12:23:44 GMT]]></title><description><![CDATA[<p>We are also facing same issue, other projects is working fine but colyseus isn't working fine. Looking forward to seeing your assistance <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a></p>
<pre><code>&quot;scripts&quot;: {
    &quot;start&quot;: &quot;ts-node index.ts&quot;,
    &quot;bundle-colyseus-client&quot;: &quot;browserify ./node_modules/colyseus.js/lib/index.js -s Colyseus -o static/colyseus.js&quot;,
    &quot;build&quot;: &quot;npm run bundle-colyseus-client&quot;,
    &quot;heroku-postbuild&quot;: &quot;npm run build&quot;
  }, 
</code></pre>
<p>Please check the below link too.<br />
<a href="https://stackoverflow.com/questions/54767053/nodejs-server-doesnt-start-with-pm2/54786719#54786719" rel="nofollow">https://stackoverflow.com/questions/54767053/nodejs-server-doesnt-start-with-pm2/54786719#54786719</a></p>
]]></description><link>http://discuss.colyseus.io/post/690</link><guid isPermaLink="true">http://discuss.colyseus.io/post/690</guid><dc:creator><![CDATA[ahtashamabbasse]]></dc:creator><pubDate>Thu, 21 Feb 2019 12:23:44 GMT</pubDate></item><item><title><![CDATA[Reply to Use PM2, typescript for Heroku on Thu, 21 Feb 2019 13:20:28 GMT]]></title><description><![CDATA[<p>Hey <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/367">@daimonkor</a>,</p>
<p>I think there's some confusion here. Heroku handles all this for you without the need for PM2 or nodemon.</p>
<p>I see you have <code>nodemon</code> in your <code>package.json</code>. Nodemon is not supposed to be used in production, and by default it does not restart automatically after a crash - it expects you to change a file and then it will restart. So, during development, you see you've made some mistake, you fix it, and the server will restart automatically when a file has changed.</p>
<p>If you do want to restart <code>nodemon</code> after crash anyway, there's this suggestion you can follow: <a href="https://github.com/remy/nodemon/issues/1221#issuecomment-356747303" rel="nofollow">https://github.com/remy/nodemon/issues/1221#issuecomment-356747303</a></p>
<p>For PM2 (which should <strong>not</strong> be used along with <code>nodemon</code>), you can use the <code>--watch</code> argument to restart when a file change occurs. I'd suggest configuring an <code>ecosystem.config.js</code> file with <code>watch: true</code> if you're using PM2: <a href="http://pm2.keymetrics.io/docs/usage/application-declaration/" rel="nofollow">http://pm2.keymetrics.io/docs/usage/application-declaration/</a></p>
<p>Hope this helps. Cheers</p>
]]></description><link>http://discuss.colyseus.io/post/693</link><guid isPermaLink="true">http://discuss.colyseus.io/post/693</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Thu, 21 Feb 2019 13:20:28 GMT</pubDate></item><item><title><![CDATA[Reply to Use PM2, typescript for Heroku on Invalid Date]]></title><description><![CDATA[<p>When deploying your application on any platform, is not recommended to use the TypeScript files. You should use the compiled JavaScript files. (<code>tsc -p tsconfig.json</code>)</p>
]]></description><link>http://discuss.colyseus.io/post/694</link><guid isPermaLink="true">http://discuss.colyseus.io/post/694</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Use PM2, typescript for Heroku on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> Thanks for help, I found heroku dyno listen process on change and crush</p>
]]></description><link>http://discuss.colyseus.io/post/741</link><guid isPermaLink="true">http://discuss.colyseus.io/post/741</guid><dc:creator><![CDATA[daimonkor]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>