SShortSingh.
Back to feed

PM2 Tutorial: Keeping a Node.js App Running Reliably on One Server

0
·3 views

PM2 is a Node.js process manager that runs an app in the background, restarts it after crashes, and keeps it alive after the user logs out. The article demonstrates this with a small order-status API for an online shop, built using only Node's built-in http module. It suggests PM2 suits a single server you control, while platforms that already manage processes make it unnecessary. The author also notes that PM2 does not survive a reboot by itself, so commands like pm2 startup and pm2 save are needed. Scaling across several machines is identified as a different problem that PM2 alone does not solve.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Running a 65B dense coding model on a single GPU: memory bandwidth and quantization trade-offs

A developer tested Ripple-65B, a dense 65-billion-parameter open coding model, on single consumer and workstation GPUs using llama.cpp. Because every parameter is active for each token, generation speed is limited mainly by how quickly the card can read memory, reaching about 14 to 16 tokens per second on a 48 GB RTX A6000. The model's mostly windowed attention keeps the key-value cache small enough that a 256K-token prompt fit on the same card once the cache was quantized. The support landed in llama.cpp in November, and the author recommends pinning a specific release that includes prebuilt CUDA binaries to speed up automated deployments. On a 24 GB RTX 3090, a 2-bit file ran faster at 23 to 31 tokens per second, though passing a simple agent test did not prove reliability on fresh coding tasks.

0
ProgrammingDEV Community ·

Reaching Home Assistant behind CGNAT without port forwarding

Home Assistant may be unreachable from outside the home even with a port forward, often because the ISP places the connection behind Carrier-Grade NAT, which blocks unsolicited inbound traffic. A quick check compares the router's WAN IP against the public IPv4 address, and whether it falls in the 100.64.0.0/10 range, to confirm the problem. For simply using the Companion app away from home, a Tailscale setup avoids exposing any ports to the internet. For external webhooks and services, outbound tunnels such as Cloudflare Tunnel, a self-managed VPS with WireGuard, or Zorven are presented, each with trade-offs around vendor lock-in and maintenance. The guide includes configuration steps and notes when each option is most appropriate.

0
ProgrammingDEV Community ·

How students should follow up after an internship application

Silence for a couple of weeks after applying is common, since recruiters often review applications in batches. The guidance recommends waiting one to two weeks after applying, or a few days past any posted deadline, and sending a thank-you note within a day after interviews. Follow-ups should go to a real person such as the recruiter who made contact, a campus recruiter, or someone met at an information session, rather than a no-reply address. Messages should stay under 100 words, mention the specific role and a relevant detail, and avoid pressure or asking whether the application was received. Keeping a tracker with follow-up dates helps students stay organized while keeping their broader application pipeline full.

0
ProgrammingDEV Community ·

BoundaryXP Proposes a Method to Make AI Agent Task Boundaries Visible and Checkable

BoundaryXP is a framework designed to make the limits of tasks assigned to teams of AI agents inspectable and traceable to their source. The article uses a vehicle maintenance review as an example, where agents must read records without altering the system, and shows how actions like editing a database or downloading an attachment may be judged differently. Its 7+1 method organizes task requirements into eight views: input scope, outputs, actions, responsibilities, resources, version and basis, completion and stopping, and explicit prohibitions. The approach also applies mathematical checks to the parent task, its subtasks, and their combined plan to detect conflicts. The method is described in a paper available on Zenodo.