Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add node.js #1821

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

add node.js #1821

wants to merge 6 commits into from

Conversation

zuohuadong
Copy link
Contributor

@zuohuadong zuohuadong commented Sep 28, 2018

I completed the 3 steps below:
  • I've read the Contribution Guide.
  • I've updated the documentation. (refer to this for how to do so).
  • I enjoyed my time contributing and making developer's life easier :)

@zuohuadong
Copy link
Contributor Author

#1727

@Mahmoudz Mahmoudz force-pushed the master branch 4 times, most recently from 0da1a63 to 58d1eb8 Compare July 29, 2019 14:52
@Mahmoudz Mahmoudz force-pushed the master branch 4 times, most recently from 134c78a to 493fc1a Compare August 12, 2019 19:46
docker-compose.yml Outdated Show resolved Hide resolved
@zuohuadong
Copy link
Contributor Author

@ahkui ok

@DungBuiDeveloper
Copy link

docker-compose up nodejs

missing file package.json

@zuohuadong
Copy link
Contributor Author

@DungBuiDeveloper

package.json is included in the project. like: composer.json

@DungBuiDeveloper
Copy link

@DungBuiDeveloper

package.json is included in the project. like: composer.json

can you make tutorial for deploy nodejs application via ngnix or apache ( pm2 processs )

@DungBuiDeveloper
Copy link

DungBuiDeveloper commented Jan 3, 2020

@zuohuadong

myconfig apache2

<VirtualHost *:80>
ServerName mambayen.tk
ServerAlias www.mambayen.tk
DocumentRoot /var/www/nodejs
 <Directory />
 Options -Indexes +FollowSymLinks
 AllowOverride None
 Require all granted
 </Directory>
ProxyRequests Off
 ProxyPreserveHost On
 ProxyVia Full
 <Proxy *>
 Require all granted
 </Proxy>
<Location />
 ProxyPass http://202.182.110.43:3009
 ProxyPassReverse http://202.182.110.43:3009
 </Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
 # alert, emerg.
 LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

i'm using pm2 run process

index.js so simple : 
var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(3009);

i think a2enmod : command not found is my problem

https://prnt.sc/qipxse

@zuohuadong
Copy link
Contributor Author

@zuohuadong

myconfig apache2

<VirtualHost *:80>
ServerName mambayen.tk
ServerAlias www.mambayen.tk
DocumentRoot /var/www/nodejs
 <Directory />
 Options -Indexes +FollowSymLinks
 AllowOverride None
 Require all granted
 </Directory>
ProxyRequests Off
 ProxyPreserveHost On
 ProxyVia Full
 <Proxy *>
 Require all granted
 </Proxy>
<Location />
 ProxyPass http://202.182.110.43:3009
 ProxyPassReverse http://202.182.110.43:3009
 </Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
 # alert, emerg.
 LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

i'm using pm2 run process

index.js so simple : 
var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(3009);

i think a2enmod : command not found is my problem

https://prnt.sc/qipxse

I will add caddy & nginx .

@Mahmoudz Mahmoudz force-pushed the master branch 2 times, most recently from 7a26bb5 to 471e699 Compare July 31, 2021 13:42
@Mahmoudz Mahmoudz force-pushed the master branch 27 times, most recently from 5503249 to 9707cb4 Compare August 13, 2021 16:05
@makowskid
Copy link
Contributor

@zuohuadong can you please review this whole thing and let us know if it's still applicable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants