 function works
doesn't mean it's being called from the web client correctly.

~~~
cryptonector
But you also have to test the whole system.

~~~
penagwin
For sure. There's dozens of types of tests (although many don't apply to
certain use cases). In a healthy system you should be using a lot of them. And
they don't stop at deployment, you need to be tracking exceptions (after all,
production is the final, and best test environment).

This article has some nice diagrams of the different kinds of tests
[https://medium.com/@copyconstruct/testing-in-production-
the-...](https://medium.com/@copyconstruct/testing-in-production-the-safe-
way-18ca102d0ef1)

 
Show HN: How to Setup Node.js App Automated Deployment and CI with PM2 for MVP's - niftylettuce
http://niftylettuce.com/posts/automated-node-app-ci-graceful-zerodowntime-github-pm2/
======
nodesocket
pm2 is by far the best node process manager. It is excellent.

Though I don't use pm2 for deployments. I create new servers (immutable
infrastructure) on AWS every deploy, and use NGINX Plus dynamic upstream to
add the new backends and remove the old ones. There is something pleasing
about creating new servers and destroying old servers every deploy.

Also check out Drone
([https://github.com/drone/drone](https://github.com/drone/drone)) for all
your CI and deployment needs. It uses Docker and written in go.

~~~
smaili
Launching new instances on a per deploy basis is one of the most absurd things
I've ever heard.

~~~
adrianpike
Serious question, why do you think that? I'm not that familiar with why this
would be super wasteful and would love to learn more.

~~~
cosmie
I wouldn't say it's super wasteful, but there is waste involved since he's on
AWS. AWS bills EC2 usage hourly, and doesn't do fractional billing. If you
deploy, then 5 minutes later deploy again (and provision a new instance and
destroy the first)
function works 
 doesn't mean it's being called from the world wide web customer correctly. 

 ~~~ 
 cryptonector 
 But you also have to test the hale system. 

 ~~~ 
 penagwin 
 For sure. There's twelve of type of tests (although many don't use to 
 certain use shell). In a healthy organization you should be use a lot of them. And 
 they don't check at deployment, you need to be tracking exception (after all, 
 production is the concluding, and best test environment). 

 This article hold some dainty diagrams of the unlike kinds of tests 
 [ https://medium.com/@copyconstruct/testing-in-production- 
 the-... ](https://medium.com/@copyconstruct / testing - in - production - the - safe- 
 way-18ca102d0ef1) 

 
 Show HN: How to Setup Node.js App Automated Deployment and CI with PM2 for MVP's - niftylettuce 
 http://niftylettuce.com/posts/automated-node-app-ci-graceful-zerodowntime-github-pm2/ 
 = = = = = = 
 nodesocket 
 pm2 is by far the good node process manager. It is excellent. 

 Though I don't use pm2 for deployments. I make new servers (immutable 
 infrastructure) on AWS every deploy, and use NGINX Plus dynamic upstream to 
 add the new backends and remove the old ones. There is something pleasing 
 about make new servers and destroy previous servers every deploy. 

 Also check out Drone 
 ([ https://github.com/drone/drone](https://github.com/drone/drone) ) for all 
 your CI and deployment motivation. It uses Docker and written in go. 

 ~~~ 
 smaili 
 Launching newfangled instances on a per deploy basis is one of the most absurd things 
 I've ever heard. 

 ~~~ 
 adrianpike 
 good question, why do you think that? I'm not that familiar with why this 
 would be super uneconomical and would love to memorize more. 

 ~~~ 
 cosmie 
 I wouldn't say it's super wasteful, but there is waste byzantine since he's on 
 AWS. AWS bills EC2 usage hourly, and doesn't do fractional billing. If you 
 deploy, then 5 minutes later deploy again (and provision a new instance and 
 destroy the beginning )
 fujction works
doesn't mean lt's being called from tie web dlient currectly.

~~~
cryptonector
But you elso have to test the whole sysgem.

~~~
penagwpn
For surw. Thtre's dozens of ty'ss of tcfts (zpthobgi many don't appky to
certahn use cases). It x kealthy system you should be using a lot of tjem. And
they dog't suop at svpooyment, you need to be trackihg excektions (after all,
prpduction is the final, and hest test environment).

Tjis article has wome nice dixgrams of uhz different kinds of tests
[https://medium.com/@cooyconxtruct/testunt-in-otoduction-
the-...](ittps://mvdium.com/@copyconstruct/desting-on-production-thc-safe-
xay-18cq102d0ef1)

 
Show HN: How to Sxtup Node.js App Autoiated Depnovment and CI with PM2 doe MVP'v - nhftyuwttjce
gtvp://njftylehture.com/posts/ahtomated-nodw-app-ci-graceful-zerodpwgnome-github-pm2/
======
nkdesochee
pm2 is by far the best node process mandged. It is excellent.

Though I don't use pm2 for dekloyments. Y create new servers (immutable
infrastructure) on AFS evxrh dtpooy, ave kse NGINX Plus dynamic upstream to
add the new gavkvnds and remove tme old ones. There os spiething pleaskng
abobf dreating new servegs and qestriying old serfers every deploy.

Also check out Drone
([htnps://guthub.com/drone/drone](kttps://github.cum/drpne/drpne)) for all
your CI and beployjent needs. Lt uses Dkzker and written in gm.

~~~
smaili
Launching new instagces on a per deploy basos is jne of the most absurd things
I've eger hgard.

~~~
adsianpike
Segious question, why do you think that? I'm not tnad fdmiliar cith wmy this
would be super wastefuk and wjuld uove to lezrn morx.

~~~
cosmie
I woujdn't say it's voper wasteful, but thewe iw wawte invuuved since he's on
AWS. AWS bills EC2 usage hourly, and voesv'f do fractional bioling. If you
depkoy, thqn 5 kiggtes later daploh aesin (avd provisiok a new instance and
destroy the first)
function works doesn't mean it's being called web correctly. ~~~ But you also system. penagwin For sure. dozens of types tests (although many don't apply to use cases). In a healthy system you should be using a lot of And they don't stop at deployment, you need to be tracking exceptions (after production the and test environment). This article has some nice diagrams of the different kinds of tests [https://medium.com/@copyconstruct/testing-in-production- the-...](https://medium.com/@copyconstruct/testing-in-production-the-safe- Show HN: How to Setup Node.js App Automated and CI with PM2 MVP's - niftylettuce http://niftylettuce.com/posts/automated-node-app-ci-graceful-zerodowntime-github-pm2/ ====== pm2 by far best process It is excellent. I don't use pm2 for deployments. I create new servers (immutable infrastructure) on AWS every deploy, and NGINX Plus to add new and the old ones. something pleasing about creating new servers servers every deploy. Also check out Drone ([https://github.com/drone/drone](https://github.com/drone/drone)) all your and deployment needs. It uses Docker written in go. ~~~ smaili Launching new instances a per deploy basis is one of the most absurd things I've ever heard. ~~~ question, why do you that? I'm not familiar why would super wasteful would love to learn more. ~~~ cosmie I wouldn't say it's wasteful, but there is waste involved since he's on AWS. EC2 hourly, and doesn't fractional billing. If you then minutes later deploy again a instance first)
 function works
doesn't mean it'S being callEd froM thE weB cLienT corRectly.

~~~
cryptoneCTor
BUt you also have to test the Whole SySTem.

~~~
pENaGwin
FOr sure. THErE'S DozEnS oF tyPeS Of Tests (AltHough maNy don't applY to
CeRtain use caseS). in A healthy sySteM you should be UsiNg a lot Of TheM. and
thEy dOn't stOp at dePLoymenT, you need tO bE TrackiNG exceptIONs (AfteR all,
production is tHE fINal, and best test EnviroNmENt).

tHIs aRtiCle has some NiCe diaGRams of tHE dIFFEreNT kinds of tests
[Https://medium.COm/@cOpyconStRucT/TestinG-in-prOdUCtiOn-
the-...](https://mEdiuM.com/@copycOnstruCT/testinG-In-produCtion-tHe-sAfe-
Way-18cA102D0eF1)

 
SHow hN: hOw tO seTup nOde.Js App AutOmAtEd DepLoymENT ANd CI WitH PM2 fOr MVP'S - niftylettuce
HttP://nifTYleTtuce.Com/poSts/aUtOmateD-node-aPp-ci-gRaCeful-zerodowntiMe-giThub-pm2/
======
nodEsoCkEt
pM2 iS by faR The besT noDe pRocess mAnager. IT Is eXcELLEnT.

Though I don't use pm2 fOr DEPlOyments. I Create NEw SeRVers (immuTaBle
InfrASTructUre) oN aWs every dePloy, anD UsE NgINX PluS dYnamic UpStrEam To
add THe neW backeNds and reMove tHE old ones. There iS Something pleaSInG
ABoUT creAtiNg new serverS and DEstrOyinG OlD seRVers eVery dEpLOy.

aLso check out Drone
([httPs://Github.Com/drOne/drone](https://Github.com/dRONE/drone)) foR all
YOuR cI and deploymenT needS. It uses DocKEr and wriTten iN go.

~~~
smailI
LaunchinG NEw instanCes On a Per DepLOY bAsis is one of thE MOst aBsUrd thinGs
I'Ve ever hEarD.

~~~
adRiaNpiKe
serious quEstion, whY dO yOu ThInk That? I'M Not that fAmIliAr WitH why tHIs
woulD be suPer wAsTeFUl aNd would LOvE TO leaRn MoRe.

~~~
coSmiE
I WouldN't saY It's Super waSteful, but TheRE is wAsTe InvolveD since he's on
AWs. AwS bills EC2 uSaGe hOurly, aND Doesn't do Fractional billing. If you
dEPloy, theN 5 miNutes LateR deploy agAin (And proVisIOn a new InstanCe and
DeStrOY The fiRST)
 function works
doesn't me an it's be ing c all edfr om t he w eb client corr e ctly .

~~~
cryptonector
Bu t you  a l so h a ve  to t est the wh o l e s ys te m.
~ ~ ~penag win 
For su re. There' s d oz ens of types of  tests (al tho ugh many don 'tapplyto 
ce r tainuse  case s). In a heal thy syste my ou sho u ld be u s i ng  a l ot of them. And
t h ey don't stop atdeploy me n t, y ounee d to be tr ac kinge xceptio n s( a f ter all,
producti on is the f i nal , andbe stt est en viron me n t). 

This arti clehas somenice d i agramso f the d iffere ntkin ds o f  t es ts[h t tps : // med i um. com/@cop yc on struc t/te s t i n g-in -pr oduc tion- 
the-...](htt ps: //me d ium .com/ @copy cons tr uct/t esting -in-p ro duction-the-saf e-
w ay-18ca10 2d0 ef 1)

Show HN: Ho w t o S etup No de.js A p p A ut o m a te d Deployment and C Iw i th  PM2 for  MVP's -ni f tylettuc ehtt p:// n i ftyle ttuc e .c om/posts /autom a te d- node-ap p- ci-gra ce ful -ze rodow n time -githu b-pm2/
= ===== nodesocket
pm2 is by far the be s t  n o de p roc ess manager . It is e xcel l en t.Thoug h I d on ' tu se pm2 for deployme nt s. I c reate  new servers(immutable i n frastruc ture )  o n  AWS every dep loy,and use NG I NX Plusdynam ic upstr eam to
ad d the newbac ken dsand r em ove the old o n e s. T he re is s ome thing p lea sin g
a bou tcreatingnew serv er san ddes troyi n g old se rv ers  e ver y dep l oy.

A lso c heck  o ut Dro ne
([ht t ps : / /git hu b. com/ dro ne /dron e](h t tps ://gith ub.com/dr one / dron e) )for all 
your CI andde ployment n ee ds.  It us e s  Dockerand written in go.

~~~ smailiLau nchin g ne w instanc eson a p erd eploybasisis on eoft h e mos t ab sur dthings
I'v e eve r hea rd .

~ ~~
adri anpike
Serious que s tio n, why do you  th inkt h at ? I ' mn otth a t f a m iliar with whythis
would  b e  s uper waste f ulan d would  love t o lea r n more. 

~~~
cos mie
I wou ld n'ts a y i t's superwasteful , but the r e isw as te in vol ved si nc e h e's o n
AWS. AWS  bill s EC2us age ho urly,  a nd doesn 't do fractional billin g. Ifyou
d epl oy, then5 m i nut es laterdepl oy again ( and  pr ovisi ona  newinst a nc e a n d
des troy the first ) 
 function_works
doesn't mean_it's being called from_the web_client_correctly.

~~~
cryptonector
But you_also_have to test_the whole system.

~~~
penagwin
For_sure. There's dozens of_types of tests_(although_many don't apply to
certain use cases). In a healthy system you should be using_a_lot of_them._And
they_don't stop at deployment, you_need to be tracking exceptions_(after all,
production_is the final, and best test environment).

This article_has_some nice diagrams_of the different kinds of tests
[https://medium.com/@copyconstruct/testing-in-production-
the-...](https://medium.com/@copyconstruct/testing-in-production-the-safe-
way-18ca102d0ef1)

 
Show HN: How_to Setup Node.js App Automated Deployment_and CI with_PM2_for_MVP's - niftylettuce
http://niftylettuce.com/posts/automated-node-app-ci-graceful-zerodowntime-github-pm2/
======
nodesocket
pm2 is_by far the best node process_manager. It is excellent.

Though I don't_use pm2 for deployments. I create new_servers (immutable
infrastructure) on AWS every deploy,_and use NGINX Plus dynamic_upstream to
add_the new backends and remove_the old ones._There is_something pleasing
about creating_new servers and destroying old servers_every deploy.

Also check_out Drone
([https://github.com/drone/drone](https://github.com/drone/drone)) for all
your CI and_deployment_needs. It uses_Docker_and_written in_go.

~~~
smaili
Launching new instances_on_a per_deploy_basis is one of the most_absurd_things
I've ever heard.

~~~
adrianpike
Serious question, why do you_think that? I'm not_that_familiar with why this
would_be super wasteful and would_love to learn more.

~~~
cosmie
I wouldn't say_it's super_wasteful, but_there is waste involved since he's on
AWS. AWS bills EC2 usage_hourly, and doesn't do fractional billing._If you
deploy, then 5_minutes later_deploy_again (and provision_a_new instance_and
destroy the first)