简体   繁体   中英

how to start node js project in a EC2 AWS instance

I am completely new to node js , I am trying to set it up in EC2 AWS.I tried using the command "npm start" but nothing has happened

below is my package.json

{
  "name": "sample",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "cookie-parser": "~1.4.4",
    "debug": "~2.6.9",
    "ejs": "~2.6.1",
    "express": "~4.16.1",
    "http-errors": "~1.6.3",
    "morgan": "~1.9.1",
    "pm2": "^5.1.2"
  }
}bouldercef$ npm start

after running npm start the below lines appear ,but not able to see the site

boulder@0.0.0 start /home/ubuntu/bouldercef

node ./bin/www

If your site is running properly in your machine, and if you have node/npm installed in your EC2 instance and you are not receiving any errors, looks like your project is running without issues.

So the problem can be that you are not connect to your site using HTTP.

Take a look on the security group attached with your instance to check if you allow users to connect on HTTP (80) or HTTPS (443).

To more information of how to make these ports available for your users check How do I allow my users to connect on HTTP (80) or HTTPS (443)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM