<?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[Could we start Colyseus app with npm package forever?]]></title><description><![CDATA[<p>We are facing some issue while using <strong>npm package forever</strong> Trying to restart the server automatically after crash.<br />
Below is the code.<br />
<strong>Before</strong><br />
<code>&quot;start&quot;:&quot;nodemon --watch '**/*.ts' --exec ts-node index.ts&quot;&quot;</code><br />
<strong>After</strong><br />
<code>&quot;start&quot;: &quot;forever start --minUptime 1000 --spinSleepTime 10000 ./index.ts&quot;,</code></p>
<pre><code>&quot;scripts&quot;: {
    &quot;start&quot;: &quot;forever start --minUptime 1000 --spinSleepTime 10000 ./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><strong>Server Stop after processing file</strong></p>
<p><img src="/assets/uploads/files/1548224030756-ea265c02-00d7-47cd-ba25-d2258773e124-image.png" alt="0_1548224034861_ea265c02-00d7-47cd-ba25-d2258773e124-image.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://discuss.colyseus.io/topic/203/could-we-start-colyseus-app-with-npm-package-forever</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 08:33:36 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/203.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Jan 2019 06:05:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Could we start Colyseus app with npm package forever? on Wed, 23 Jan 2019 06:14:50 GMT]]></title><description><![CDATA[<p>We are facing some issue while using <strong>npm package forever</strong> Trying to restart the server automatically after crash.<br />
Below is the code.<br />
<strong>Before</strong><br />
<code>&quot;start&quot;:&quot;nodemon --watch '**/*.ts' --exec ts-node index.ts&quot;&quot;</code><br />
<strong>After</strong><br />
<code>&quot;start&quot;: &quot;forever start --minUptime 1000 --spinSleepTime 10000 ./index.ts&quot;,</code></p>
<pre><code>&quot;scripts&quot;: {
    &quot;start&quot;: &quot;forever start --minUptime 1000 --spinSleepTime 10000 ./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><strong>Server Stop after processing file</strong></p>
<p><img src="/assets/uploads/files/1548224030756-ea265c02-00d7-47cd-ba25-d2258773e124-image.png" alt="0_1548224034861_ea265c02-00d7-47cd-ba25-d2258773e124-image.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://discuss.colyseus.io/post/660</link><guid isPermaLink="true">http://discuss.colyseus.io/post/660</guid><dc:creator><![CDATA[ahtashamabbasse]]></dc:creator><pubDate>Wed, 23 Jan 2019 06:14:50 GMT</pubDate></item><item><title><![CDATA[Reply to Could we start Colyseus app with npm package forever? on Invalid Date]]></title><description><![CDATA[<p>Aah interesting I'm also wondering about this thing but don't know about forever package. Hope so it will solve my problem too while deploying the game I'm working on multiplayer puzzle game in JS. And noticed that whenever server is crashed need to spin it again.</p>
]]></description><link>http://discuss.colyseus.io/post/661</link><guid isPermaLink="true">http://discuss.colyseus.io/post/661</guid><dc:creator><![CDATA[usamasermad]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Could we start Colyseus app with npm package forever? on Invalid Date]]></title><description><![CDATA[<p>did you resolve this issue?</p>
]]></description><link>http://discuss.colyseus.io/post/691</link><guid isPermaLink="true">http://discuss.colyseus.io/post/691</guid><dc:creator><![CDATA[ahtashamabbasse]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Could we start Colyseus app with npm package forever? on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/279">@ahtashamabbasse</a> AFAIK you can't use <code>forever</code> with TypeScript files, you need to compile them into JavaScript and run it against the JavaScript output.</p>
<p><strong>Compile the project:</strong></p>
<pre><code>tsc -p tsconfig.json
</code></pre>
<p><strong>Start <code>forever</code> using compiled <code>lib/index.js</code></strong></p>
<pre><code>forever start --minUptime 1000 --spinSleepTime 10000 ./lib/index.js
</code></pre>
]]></description><link>http://discuss.colyseus.io/post/692</link><guid isPermaLink="true">http://discuss.colyseus.io/post/692</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>