Skip to content

Instantly share code, notes, and snippets.

@gladiatorAsh
Created September 3, 2018 00:49
Show Gist options
  • Save gladiatorAsh/4eaf1700a48b91ff6ceccda70da4edc7 to your computer and use it in GitHub Desktop.
Save gladiatorAsh/4eaf1700a48b91ff6ceccda70da4edc7 to your computer and use it in GitHub Desktop.
Deploy node to AWS

Deploy to AWS (For Windows)

Tools

  1. RoboMongo (For testing Mongo DB
  2. Kitematic (for easy containers)
  3. WinSCP (transfering files)
  4. Postman (For Testing API)
  5. Cygwin (For easy terminals)

Libraries

  1. helmet (for security)
  2. ipify (for ip addresses of clients)
  3. nodemailer (for email)
  4. xml2js (for xml to json)
  5. forever (for running forever)

Commands

  1. forever -a start -l forever.log -o output.log -v -d server.js
  2. forever -a start -c python runServer.py
  3. forever list
  4. forever -a start -l forever.log -o output.log -v -d server.js
  5. forever -a start -c python runServer.py
  6. pkill -f node
  7. sudo service mongod start
  8. sudo lsof -i -P -n

New Issues

/*Solves CORS issues*/
res.header('Access-Control-Allow-Origin', '*');
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment