Skip to content

Instantly share code, notes, and snippets.

@nairihar
Last active July 14, 2022 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nairihar/e19842082d9510dfc6fef41a2a851ea8 to your computer and use it in GitHub Desktop.
Save nairihar/e19842082d9510dfc6fef41a2a851ea8 to your computer and use it in GitHub Desktop.
Scaling up Node.js Socket Server with Nginx and Redis | server.js
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.end(`Hi, PID: ${process.pid}`);
});
app.listen(process.env.PORT);
console.log(`Server running on ${process.env.PORT} port, PID: ${process.pid}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment