This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const cluster = require("cluster"); | |
| const express = require("express"); | |
| const numCPUs = require("os").cpus().length; | |
| const app = require | |
| if (cluster.isMaster) { | |
| console.log(`Master ${process.pid} is running`); | |
| // Fork workers. | |
| for (let i = 0; i < numCPUs; i++) { | |
| cluster.fork(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # install httpd (Linux 2 version) | |
| # create role with s3 write access privilege and set to ec2 instance | |
| yum update -y | |
| yum install -y httpd | |
| systemctl start httpd | |
| systemctl enable httpd | |
| usermod -a -G apache ec2-user | |
| chown -R ec2-user:apache /var/www/html | |
| chmod 2775 /var/www/html |
OlderNewer